Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Tif compressioin parameters?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01039665
Message ID:
01039722
Vues:
15
Craig,

Thank you so much for the comprehensive list on your blog!

I've saved the list in a header file named gdiplusx.h.

I'm still running into problems with creating TIFF with parameter set:
#include gdiplusx.h 

PUBLIC obmp,og,obrush,ocolor,ofontfamily,ofont,opoint,ostringformat
STORE null TO obmp,og,obrush,ocolor,ofontfamily,ofont,opoint,ostringformat
SET CLASSLIB TO (HOME()+"ffc\_gdiplus.vcx")
obmp = CREATEOBJECT("gpbitmap",SYSMETRIC(1),SYSMETRIC(2),0x0026200A)
og = CREATEOBJECT("gpgraphics")
m.og.CreateFromImage(m.obmp)
ocolor = CREATEOBJECT("gpcolor",200,56,153,255)
obrush = CREATEOBJECT("gpsolidbrush",ocolor)
ofontfamily = CREATEOBJECT("gpfontfamily","Verdana")
ofont = CREATEOBJECT("gpfont",m.ofontfamily,72)
m.opoint = CREATEOBJECT("gppoint",0,0)
m.ostringformat = CREATEOBJECT("gpstringformat",0)
?m.og.DrawStringA("Hello, World!",m.ofont,m.opoint,m.ostringformat,m.obrush)
*!* Save to gif
CLEAR 
?m.obmp.SaveToFile("c:\example.bmp","image/bmp") && Works 
?m.obmp.SaveToFile("c:\example.gif","image/gif") && Works 
?m.obmp.SaveToFile("c:\example.jpeg","image/jpeg") && Works 
?m.obmp.SaveToFile("c:\example.jpg","image/jpeg") && Doesn't Works 
?m.obmp.SaveToFile("c:\example.jpeg","image/jpeg","quality=100") && Works 
?m.obmp.SaveToFile("c:\example.tif","image/tiff") && Works 
?m.obmp.SaveToFile("c:\example1.tif","image/tiff","Compression=3,ColorDepth=1,SaveFlag=18") && Does not work
?m.obmp.SaveToFile("c:\example1.bmp",ImageFormatBMP) && Errors on StringToGUID method
?m.obmp.SaveToFile("c:\example1.gif",ImageFormatGIF) && Errors on StringToGUID method
?m.obmp.SaveToFile("c:\example1.jpg",ImageFormatJPEG,) && Errors on StringToGUID method
?m.obmp.SaveToFile("c:\example1.tif",ImageFormatTIFF,"Compression=3,ColorDepth=1,SaveFlag=18") && Errors on StringToGUID method
Do you see what I'm doing wrong?
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform