Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem converting a file in BMP format
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01638996
Message ID:
01639000
Views:
48
Thanks Martina.....can you suggest me the code to use.....i am not very familiar with gdiplus class...if not a problem and if not complex...
>Hi Michele,
>
>The problem is... PNG use "transparent background".
>The way is create new image, paint rectangle with white back color and paint PNG image.
>
>MartinaJ
>
>>i have a problem converting an image in png format to bmp....The image contains a signature (signature in black and backcolor in white)....When converted it si all black.
>>The code i use is this:
>>
>>Function ConvertImage
>>Lparameters lcSource, lcType
>>lcType = Upper(lcType)
>>Local lcDestination
>>lcDestination = justpath(lcSource) + "\" + juststem(lcSource)
>>
>>local loImage as gpimage of home() + "ffc/_gdiplus.vcx"
>>loImage = newobject("gpimage", home() + "ffc/_gdiplus.vcx")
>>loImage.CreateFromFile(lcsource)
>>Do Case
>> Case lcType = "JPG"
>> lcDestination = lcDestination + ".jpg"
>> loImage.SaveToFile(lcDestination,"image/jpeg")
>> Case lcType = "BMP"
>> lcDestination = lcDestination + ".bmp"
>> loImage.SaveToFile(lcDestination,"image/bmp")
>> Case lcType = "TIFF"
>> lcDestination = lcDestination + ".tif"
>> loImage.SaveToFile(lcDestination,"image/tiff")
>> Case lcType = "GIF"
>> lcDestination = lcDestination + ".gif"
>> loImage.SaveToFile(lcDestination,"image/gif")
>> Case lcType = "PNG"
>> lcDestination = lcDestination + ".png"
>> loImage.SaveToFile(lcDestination,"image/png")
>>EndCase
>>
>>Return lcDestination
>>
>>What can i do ? I have to convert this image because in Crystal Reports i have some problems to print a general field when contains in image in png format....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform