Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to convert programmatically TIFF to JPG ?
Message
From
11/10/2007 09:13:01
 
 
To
10/10/2007 10:19:38
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01260010
Message ID:
01260247
Views:
11
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform