I'm trying to save the modified image to the same file name. GdpictureImaging.getStat() return me 7 (win32error), which I believed cause by trying to save image on the same image that my application currently working on. The SaveAs* function works just fine when I save to different file name. I need to replace current image that I'm working on with the new one (after did some image manipulation). Any work around? Maybe I did it a wrong way...
My sample code:
- Code: Select all
//Initially display image from file
oGdPictureViewer.displayfromfile('C:\my_image\test.gif')
ll_imageID = oGdPictureViewer.GetNativeImage
oGdPictureImaging.SetNativeImage(ll_imageID)
//-------------------------
Did some image manipulation - add text, shape etc ........
//-------------------------
//Save the changes
oGdPictureImaging.SaveAsGIF('C:\my_image\test.gif')
Here SaveAsGIF failed and when I check GdpictureImaging.getStat(), it return me 7 (win32error).
I try doing these:
- Code: Select all
//Save the changes
ll_cloneid = oGdPictureImaging.CreateClonedImage(ll_imageID)
oGdPictureImaging.CloseImage(ll_imageID)
oGdPictureImaging.setNativeImage(ll_cloneid)
oGdPictureImaging.SaveAsGIF('C:\my_image\test.gif')
But it still failed to save !!
Any idea??? I believed I did it a wrong way. Some one please guide me ...
Regards
MUL
