Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API functions to return jpeg dimensions?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00679166
Message ID:
00680359
Views:
18
Fair enough, David.

How would you go about loading randomly sized images into an ImageList so you can use a ListView to display thumbnails just like Explorer does.

Although the LOADPICTURE() documentation mentions only bmp, ico and wmf file types, jpgs are picked up just fine. The problem is ImageLists must have all the images with the same dimensions. Any clues?

John Burton

>John,
>
>As long as .Stretch is 0 (and it will be 0 when instantiating the VFP baseclass Image) setting the .Picture property of the object will cause it's .Height and .Width to be set based on the image file. You can of course change them after it's loaded, but the code Sergey posted works just fine for this problem.
>

>>The oPic.Height / oPic.Width properties concern the display height and width. To find the pixel dimensions without going to a 3rd party utility, try using the PictureClip control PICCLP32.OCX. The documentation refers to 'bitmaps' but jpegs work as well.
Previous
Reply
Map
View

Click here to load this message in the networking platform