Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GDI+ Save as non VFP Standard TIFF file
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Miscellaneous
Thread ID:
01128486
Message ID:
01144196
Views:
41
At this point I was able to do compression 6 (none) and 2 (LZW).
I don't read german very well, but there is an example here.
http://www.activevb.de/tipps/vb6tipps/tipp0688.html


>No wonder, LZW is the default compression. You may do it even without specifying the compression,
>
>oLogoImage.SaveToFile("c:\ex.tif","image/tiff")
>
>
>But what about other TIF compressions and/or changing compression?
>
>>I was able to acheive LZW compression by using the following
>>
>>
cImage = Getpict('jpg')
>>COMPRESSTOTIFF(cImage)
>>Function COMPRESSTOTIFF(lcImage)
>>  Set Classlib To Home()+'ffc/_gdiplus.vcx' Additive
>>  oLogoImage = Newobject('gpBitmap',Home()+'ffc/_gdiplus.vcx')
>>  oLogoImage.CreateFromFile(lcImage)
>>  oLogoImage.SaveToFile("c:\ex.tif","image/tiff","compression=2" )
>>Endfunc
>>
>>
>>
>>>Hi,
>>>
>>>The parameter SAVEADD can be used to create multiframe TIFF image files.
>>>I covered this in my article in last May issue of UTMAG
>>>http://www.utmag.com/wconnect/wc.dll?9,7,10,,2115
>>>
>>>I posted on my Blog something about encoder parameters:
>>>http://weblogs.foxite.com/cesarchalom/archive/2006/06/10/1786.aspx
>>>
>>>
>>>About Compression:
>>>
>>> #DEFINE EncoderValueCompressionLZW 2
>>> #DEFINE EncoderValueCompressionCCITT3 3
>>> #DEFINE EncoderValueCompressionCCITT4 4
>>> #DEFINE EncoderValueCompressionRle 5
>>> #DEFINE EncoderValueCompressionNone 6
>>>
>>>The only parameter that I could make GDI+ accept to an image was EncoderValueCompressionNone, what means no changes... :-(((
>>>
>>>I'm sure that's a solution for it, I've seen in some messages in MSDN forums, that this could be possible changing some bits directly, but for this task we would need to use the GDI+ function "LockBits", using some direct API calls. But I've not tried it yet.
>>>
>>>I've also seen something in www.news2news.com , about converting an image to monochrome (1bpp)
>>>
>>>
>>>About ColorDepth:
>>>I've tried saving in many ways, but GDI+ accepted only 32 bpp.
>>>
>>>Regards
>>>
>>>Cesar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform