File lock...

Discussions about image processing and document imaging.
Post Reply
Eric
Posts: 12
Joined: Wed Oct 03, 2012 3:56 am

File lock...

Post by Eric » Thu Mar 20, 2014 4:22 am

I use _oGdPictureImaging.TiffCreateMultiPageFromGdPictureImage(imageId) to create a multipage tiff file ,

and i use _oGdPictureImaging.TiffSaveMultiPageToFile(imageId, savePath, TiffCompression.TiffCompressionCCITT4) to save tiff file,

but when i want to delete file after use _oGdPictureImaging.CreateGdPictureImageFromFile(savePath) to open it,

the file locked....

i use _oGdPictureImaging.TiffIsEditableMultiPage(imageId) to check it's state, it return true.

i try again, i create a image and save it to single tiff page, then use the same method to check editable state, it return false and i can delete the file...

How do i solve the file can't delete problem with it an editable multipage tiff file?

ps. my gdPicture version is v8

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: File lock...

Post by SamiKharma » Mon Apr 14, 2014 2:08 pm

Hi,

From the remarks of the CreateGdPictureImageFromFile method documentation:
To open multipage images in read-only mode call the TiffOpenMultiPageForWrite() method specifying False for tiff images or the GifOpenMultiFrameForWrite() function for gif images.

I am guessing you are trying to delete an image that is open in write mode that is why you are getting the lock.

Best,
Sami

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest