Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GPIMAGE 2 availability for VFP 8
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01462538
Message ID:
01462917
Vues:
50
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform