Notifications
Clear all

[Closed] DotNet lock the file

Hi everybody!
When I create a DotNet Bitmap from a file, the file is no longer editable. Explorer said: File is in use.
I have to close 3ds Max to edit the image file. Why does DotNet lock the image file, and how can I unlock it? Or do I have to clear the cache? Please somebody help
Thank you

2 Replies
 lo1

one way of doing it is:

local tempBmp = dotNetObject "System.Drawing.Bitmap" "C:\\myImage.jpg"
local myBmp = dotNetObject "System.Drawing.Bitmap" tempBmp
tempBmp.dispose()

Thanks, it works.