PeterH
October 1st, 1999, 06:38 AM
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?
|
Click to See Complete Forum and Search --> : Height and Width for gif and jpg PeterH October 1st, 1999, 06:38 AM 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? Crazy D @ Work October 1st, 1999, 07:14 AM 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 :-) santulan October 1st, 1999, 11:18 AM 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 PeterH October 4th, 1999, 02:57 AM 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 Crazy D @ Work October 4th, 1999, 06:34 AM 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 :-) czimmerman October 4th, 1999, 12:08 PM See http://www.freevbcode.com/ShowCode.Asp?ID=112. It is a whole class designed for this purpose. PeterH October 6th, 1999, 01:53 AM Thank you,this worked perfectly! codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |