Monthly Archives: April 2006

Do you see something wrong in the code below ?

local lcsource, lcdest
lcsource = getpict()
lcdest = justpath(lcsource) + "\_" + juststem(lcsource)

local loimage as gpimage of home() + ffc/_gdiplus.vcx
loimage = newobject("gpimage",home()+"ffc/_gdiplus.vcx")
loimage.createfromfile(lcsource)
loimage.savetofile(lcdest + ".png","image/png")

That's a very simple code, that is supposed to load an image and save it as a png. But nothing happens ! Can you guess why ???

The Savetofile method from gpimage class from _gdiplus.vcx must receive as a required second parameter, the "tvclsidencoder", that can be the clsid of the encoder to… Continue reading