Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TIFF Parameters not working, why?
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Title:
TIFF Parameters not working, why?
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01039944
Message ID:
01039944
Views:
47
Hi all,

I have created the following prg to save a TIFF file using GDI+ classes.

However, I'm running into problems with creating TIFF with parameter set:
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
What I'm doing wrong?

Any help will be appreciated!
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

Reply
Map
View

Click here to load this message in the networking platform