S
SStory
I use a bitmap class new bitmap(filepath)
this should and does load my jpg into memory.
I then want to use mybitmap.save(filepath,imaging.imageformat.jpeg) to save
it; overwriting the original.
If this outfile path is different there is no problem but when it is the
same file it blows up with a generic GDI+error.
So I tried
dim strmOut as new filestream(filepath,filemode.create)
then mybitmap.save(strmOut,imaging.imageformat.jpeg)
strmOut.close
This tells me that it can't open the file because another process has it
open.
Should the bitmap constructor open a file, read it in, close it and release
any locks?
If so why I am having problems trying to overwrite the file?
Any help appreciated.
Thanks,
Shane
this should and does load my jpg into memory.
I then want to use mybitmap.save(filepath,imaging.imageformat.jpeg) to save
it; overwriting the original.
If this outfile path is different there is no problem but when it is the
same file it blows up with a generic GDI+error.
So I tried
dim strmOut as new filestream(filepath,filemode.create)
then mybitmap.save(strmOut,imaging.imageformat.jpeg)
strmOut.close
This tells me that it can't open the file because another process has it
open.
Should the bitmap constructor open a file, read it in, close it and release
any locks?
If so why I am having problems trying to overwrite the file?
Any help appreciated.
Thanks,
Shane