Image file not closed after saving/converting 
Author Message
 Image file not closed after saving/converting

Hi there.

What I do is getting a file-upload from a
System.Web.UI.HtmlControls.HtmlInputFile field and then
saving it both as a thumbnail and as is.

Oddly, the system sometimes responds with a "the file is
still in use by antoher process" when I access it at a
later time.

How can I make sure the image is closed correctly?

For saving I use:

dim UL as System.Web.UI.HtmlControls.HtmlInputFile

Dim img As System.Drawing.Image
  img = img.FromFile(Folder & FileName)
  img = picBox.Image.GetThumbnailImage(imgBreite, imgH?he,
aborter, ptr)

I have a notion that the first save (UL.postedfile.saveAs)
might be the culprit.
Also, the aborter and the ptr are defined, but not set.  
Might this be the problem?
Any ideas, help?  Is this a bug?


Sun, 16 Jan 2005 15:32:40 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Opening and saving flat image files (not *.bmp)

2. I need to save an image from an image list to a file

3. Converting image files to icon files

4. Code not saved when closing form??

5. Close and Save Open Excel File

6. Closing a file without displaying the Save prompt

7. close file without saving

8. Close and Save Various Files At Once

9. Getting Word to close a file without asking if you want to save

10. Closing an Excel File without Saving

11. Saving and Closing an EXCEL file...

12. need help: Open Excel, run macro, save file, close Excel


Powered by phpBB® Forum Software