|
-
October 1st, 1999, 06:38 AM
#1
Height and Width for gif and jpg
How can get the width and height for a gif or jpg file? I need this feature in an ActiveX-dll running on a webserver so I mustn't use forms or formcontained controls. Can I get the info by parsing the file?
-
October 1st, 1999, 07:14 AM
#2
Re: Height and Width for gif and jpg
You probably can parse it too, but you can declare a variable as Picture, use LoadPicture to load the gif/jpg, and use Picture.Width and Picture.Height to get the width and height (don't forget to set the variable to nothing after using it :-)
Crazy D @ Work :-)
-
October 1st, 1999, 11:18 AM
#3
Re: Height and Width for gif and jpg
Hi,
If I rightly understood your question, Then you can always get height and width of any picture by just placing it in any html development tool like front page, hot dog and look at the image property.
Good Luck
Santulan
-
October 4th, 1999, 02:57 AM
#4
Re: Height and Width for gif and jpg
Thanks for the tip, but as I need the width and height in pixels, I would have to use ScaleX/Y which demands a form
-
October 4th, 1999, 06:34 AM
#5
Re: Height and Width for gif and jpg
Nope, to convert twips to pixels, use Screen.TwipsPerPixelX and Screen.TwipsPerPixelY
(on most machines these values are 15, but you better use this instead of hardcoding 15)
Crazy D @ Work :-)
-
October 4th, 1999, 12:08 PM
#6
Re: Height and Width for gif and jpg
See http://www.freevbcode.com/ShowCode.Asp?ID=112.
It is a whole class designed for this purpose.
-
October 6th, 1999, 01:53 AM
#7
Re: Height and Width for gif and jpg
Thank you,this worked perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|