>>Hi Tommy,
>>
>>Just uploaded GPIMAGE2 to a new location.
>>Please try it and let me know if it goes ok
>>
http://weblogs.foxite.com/files/vfpimaging/gpimage2/gpimage2.zip>>
>>Cesar
>
>Cesar,
>
>I ran into a problem when trying to accomplish this...
>
>A) Take a Large 16 Million color bitmap
>
>B) Resize to 320X240 bits (worked OK)
>
>C) Save as a TIFF file (only 2 colors - B/W) - crashes
>
>Error on line
>
>This.stat = GdipSaveImageToFile(This.nativeImage, This.WideStr(lcFile), @encoderClsid, @encoderParams)
>
>of procedure
>
>Procedure SaveAsTIFF(tcFileName, tnCompress, tnColorDepth)
>
>with parameters
>tcFileName = "_787.bmp"
>
>tnCompress = blank
>
>tnColorDepth = 2
>
>-------------------------
>
>Also, can I save from a 16 Million color Bitmap to a 2 color bitmap?
>
>Thanks a bunch!
I'm not really sure if GPIMAGE2 can save in MONOCHROME bitmaps.
But I'm sure that GdiPlusX can convert it.
Even not having VFP9, you can still download the GdiPlusX sources, and open the file "System.Drawing.Prg"
Look for the keyword "Monochrome", and there you'll find the source code that I used in that function, and adapt it in GPIMAGE2
A faster way would be to use Anatoly Mogilevets' solution, from
www.news2news.com