Sign in to follow this  
Followers 0
Phenom

height and width of an image

7 posts in this topic

How can you get the height and width of an image?

Share this post


Link to post
Share on other sites

It may be, that you are looking for _GDIPlus_ImageGetWidth and _GDIPlus_ImageGetHeight

Share this post


Link to post
Share on other sites

I tried that on an image and got a height of -1.

Share this post


Link to post
Share on other sites

Try harder.

_GDIPlus_Startup


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Syntax of _GDIPlus_ImageGetWidth or _GDIPlus_ImageGetHeight should look like this:

_GDIPlus_Startup ()
    $BMPBuff1 = _GDIPlus_BitmapCreateFromFile(...) ;<<< This part depends from where you take image
    $iX = _GDIPlus_ImageGetWidth ($BMPBuff1)
    $iY = _GDIPlus_ImageGetHeight ($BMPBuff1)
    _GDIPlus_ImageDispose ($BMPBuff1)
    _GDIPlus_ShutDown ()

Another question is: are you talking about *.bmp picture or something else, like *.jpg?

Edited by Makaule

Share this post


Link to post
Share on other sites

I'm talking about a .bmp picture.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0