CreateImageFromPicture
Posted: Sun Nov 29, 2009 12:55 am
Hello,
I'm having trouble in VB6 with CreateImageFromPicture.
Here is some background: I'm working with a vector-based WMF file that is saved in many of our existing user databases. The type of picture has always displayed OK in a standard Image control. Of course, the colors are limited, so I would like to improve the quality with GDPicturePro5.
The problem is the images do not directly display at the highest quality using either CreateImageFromFile or CreateImageFromMetaFile. (They also open as lo-res when I open them with the new version of Paint in Windows 7.) The images sometimes display very nicely after first staging them in an Image control, and then using CreateImageFromPicture. But, some of the images return 0 instead of a handle with this method.
I've attached two picture files in a ZIP folder. RED.wmf returns a handle from CreateImageFromPicture and looks great, but YELLOW.wmf returns 0.
The ZIP flder also contains two example screen shots that illustrate the problem in the application. The Yellow example shows the result of CreateImageFromFile viewing the picture directly, but not at HiRes. The Red example shows the HiRes image displayed after first staging the picture in the Image control. Both examples have the Image version of the picture on the right. The background is transparent.
Any help you can offer will be appreciated.
Regards,
DanH
I'm having trouble in VB6 with CreateImageFromPicture.
Here is some background: I'm working with a vector-based WMF file that is saved in many of our existing user databases. The type of picture has always displayed OK in a standard Image control. Of course, the colors are limited, so I would like to improve the quality with GDPicturePro5.
The problem is the images do not directly display at the highest quality using either CreateImageFromFile or CreateImageFromMetaFile. (They also open as lo-res when I open them with the new version of Paint in Windows 7.) The images sometimes display very nicely after first staging them in an Image control, and then using CreateImageFromPicture. But, some of the images return 0 instead of a handle with this method.
I've attached two picture files in a ZIP folder. RED.wmf returns a handle from CreateImageFromPicture and looks great, but YELLOW.wmf returns 0.
The ZIP flder also contains two example screen shots that illustrate the problem in the application. The Yellow example shows the result of CreateImageFromFile viewing the picture directly, but not at HiRes. The Red example shows the HiRes image displayed after first staging the picture in the Image control. Both examples have the Image version of the picture on the right. The background is transparent.
Any help you can offer will be appreciated.
Regards,
DanH