If getting the pixel dims of a jpeg is out of the question, what about a bitmap??
Cheers
Mafro
Printable View
If getting the pixel dims of a jpeg is out of the question, what about a bitmap??
Cheers
Mafro
use the GetBitmapDimensionEx API
Code:Private Declare Function GetBitmapDimensionEx Lib "gdi32" Alias "GetBitmapDimensionEx" (ByVal hBitmap As Long, lpDimension As SIZE) As Long
Getting the pixel dimensions of a jpeg is out of the question? Huh? Just load it up into an image box, get the height and width, then divide those by 15. Correct me if I'm wrong but there's 15 twips to a pixel.
(Oh, and make sure the autoredraw is set to true so it automatically sizes up the imagebox)
[Edited by Baron_Fel on 04-06-2000 at 12:57 PM]
Well, I have to correct you.Quote:
Correct me if I'm wrong but there's 15 twips to a pixel.
Twips per Pixel depend on the windows screen settings. With (normal) small fonts settings, you are right. If you use large font settings, there are 12 twips per pixel. And of course there are custom settings.
Use Screen.TwipsPerPixelX and Screen.TwipsPerPixelY for this purpose.
Sorry, I've got my screen set to 1024 x 1278 (something like that) and I just averaged. Anyway, mine is actually 14.8745...Not exactly 15 either.
Thanks for the info though...