Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to convert programmatically TIFF to JPG ?
Message
De
11/10/2007 09:13:01
 
 
À
10/10/2007 10:19:38
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01260010
Message ID:
01260247
Vues:
12
>How to do that in VFP 9.0 ? I can do it manually in Ms-Paint, but cannot do it programmatically.

Hi Mark,

The code below uses the GdiPLusX library:
* Initialize GdiPlusX
DO LOCFILE("System.prg")

WITH _Screen.System.Drawing

   * Load Bitmap into Memory
   LOCAL loSource as xfcBitmap
   loSource = .Bitmap.FromFile(GETPICT("tiff"))

   * Save in new Image Format
   loSource.Save("c:\TIFF2JPG.jpg", .Imaging.ImageFormat.Jpeg)
ENDWITH
Of course there are lots of other thing you can do here, like extract each of the frames of the TIFF.
It's also possible to set the quality of the JPEG.

Hope this helps

Cesar Chalom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform