Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using GDI+ for changes from color to Gray
Message
De
06/05/2008 10:49:34
 
 
À
06/05/2008 04:53:13
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01315104
Message ID:
01315348
Vues:
22
>Dear Cesar
>
>How are you ?
>I know you are very interested in using GDI :)
>In fact, i would like to convert the color jpg to 1bit black/white file for special purpose printing. could you enlighting me ? Tks
>

See if this helps you:

PS: Requires GdiPlusX
** HOWTO: Get a Monochromatic 1 bit per pixel image

DO LOCFILE("System.App")

WITH _SCREEN.System.Drawing
   * Create a Bitmap object based on a BMP file.
   LOCAL loOriginalBmp AS xfcBitmap
   loOriginalBmp = .Bitmap.New(GETPICT())
    
   LOCAL loMonoChrBmp as xfcBitmap
   loMonoChrBmp = loOriginalBmp.GetMonochrome()
    
   * Dispose the original Bitmap because we don't need it any more
   loOriginalBmp = NULL
	
   * Save the created Monochromatic Bmp
   loMonochrBmp.Save("c:\Monochromatic.bmp", .Imaging.ImageFormat.Bmp)
ENDWITH 

RETURN
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform