I have an issue which only occurs intermittently on workstations running win7 or above, not on XP machines. Its only become a problem now because the customer has only just migrated to Windows 7 (not kidding!)
When trying to open the tiff to interrogate it, I get:
Obviously I'd expect this if the thumbnail viewer had the file open - it doesn't and I make double sure by closeanddispose on it before calling the routine.The process cannot access the file 'xxxx.tif' because it is being used by another process.
The routine in question simply checks if any of the pages in a tiff file are colour and returns true/false. Eg:
Code: Select all
Using tif As New Vintasoft.Imaging.Codecs.Tiff.TiffFile(sourceFile, readOnlyAccess:=True)
For Each page In tif.Pages
If (page.BitsPerPixel) >= 24 Then
bCol = True
Exit For
End If
Next
End Using
Code: Select all
Using tif As New Vintasoft.Imaging.Codecs.Tiff.TiffFile(memstream)
For Each page In tif.Pages
If (page.BitsPerPixel) >= 24 Then
bCol = True
Exit For
End If
Next
End Using
I've looked at opportunistic locking and also any issues on the server where the tif files are located but not found any.
Any suggestions?
Cheers
Phil