gdi+ - System.Drawing.Image.FromFile does not close the file stream -
gdi+ - System.Drawing.Image.FromFile does not close the file stream -
if create image method , seek delete/modify image file error because there stream still using file.
how can delete or dispose of stream can work on file?
do not utilize method. utilize fromstream instead , this:
using filestream = new io.filestream("d:\test.jpg", io.filemode.open) dim x = system.drawing.image.fromstream(filestream) 'do image manipulation...' end using io.file.delete("d:\test.jpg")
gdi+ system.drawing
Comments
Post a Comment