The problem seems to be already known with the handling of Image(s). I want to read a Image without locking it. Through various other questions (ex. question), I have found various workarounds. Something that works for many is to save the image using a bitmap ex:
if (new FileInfo(openImageDialog.FileName).Exists) {
Image tmp = Image.FromFile(openImageDialog.FileName);
pictureBoxImage.Image = new Bitmap(tmp);
tmp?.Dispose();
}
My problem with this is that I want to display a png with transparency, which is clearly lost with a bitmap.
Can someone come to my rescue?