Results 1 to 5 of 5

Thread: Getting dimensions of a bitmap??

  1. #1
    Guest
    If getting the pixel dims of a jpeg is out of the question, what about a bitmap??

    Cheers
    Mafro

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    use the GetBitmapDimensionEx API


    Code:
    Private Declare Function GetBitmapDimensionEx Lib "gdi32" Alias "GetBitmapDimensionEx" (ByVal hBitmap As Long, lpDimension As SIZE) As Long

  3. #3
    Junior Member
    Join Date
    Apr 2000
    Posts
    24

    What?

    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]

  4. #4
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Correct me if I'm wrong but there's 15 twips to a pixel.
    Well, I have to correct you.
    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.

  5. #5
    Junior Member
    Join Date
    Apr 2000
    Posts
    24

    Ok...

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width