Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert PNG to BMP and MSK files
Message
 
To
05/07/2005 10:55:27
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
01028982
Message ID:
01029045
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
Malcolm,

One way to cheat is to edit the PNG and replace all white with off-white (RGB(255, 255, 254)). Then, set the transparent color (or area) to true white (if you can do that). Then, save the file as a BMP. You won't need a MSK file at all, since the true white will be what you want as transparent and the off-white will be what you want as white. No one will be able to tell that RGB(255, 255, 254) isn't true white by looking at it... ;) When I use bitmaps that contain any white in them, I always edit them and replace the white with the off-white. I never did like the idea of MSK files.

HTH,
Chad

>Hi David,
>
>> I'm pretty sure GDI+ will convert PNG to BMP and therefore to MSK since it's the same file format.
>
>The complication is that (as I understand things) the BMP contains the image and transparency (white) data and the MSK file contains the data that overrides the white=transparency data with white=white data.
>
>So its really a two part conversion, first convert the PNG to BMP, then update the BMP converting PNG transparency to white, followed by creating a MSK file containing data for the pixels that need to remain white vs transparent.
>
>I've found plenty of PNG to BMP conversion utilities - but none with any support for the MSK file format that VFP uses.
>
>Malcolm
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform