Image.Clone does not unlock the file

Turns out, copying an image using Clone really does make an exact copy. You can’t just open an image, clone it, then safely close it as you might expect, because it also copies the file lock.

Instead, copy the image in memory using Image copy = new Image(source).

Creative Commons License
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
This entry was posted in .net, C#, Programming, Uncategorized and tagged , , , , , , , . Bookmark the permalink.

One Response to Image.Clone does not unlock the file

  1. lxndr says:

    thank you ))

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>