0

I work with WPF app, I need a some function like photoshop. That is, I do crop, then skew transform, then take bitmap from results, or skew transform, then crop and take bitmap from results.

I need work with my picture in memory. Because, every step saves image to disk, and loads image from disk, I catch an exception:

This file take other process.

I think the reason why is a the process is

BitmapImage bi = new BitmapImage(new Uri(fileDownload.FileName));

I dont know how to fix that.

Thank you, so much. Any help would be grea

Screen --- enter image description here

Alex Repeckiy
  • 173
  • 10
  • How about [`using` blocks](http://stackoverflow.com/questions/212198/what-is-the-c-sharp-using-block-and-why-should-i-use-it) to ensure the file handles etc. are correctly released? – Uwe Keim Dec 13 '15 at 14:58
  • BitmapImage must be implicitly convertible to IDisposable – Alex Repeckiy Dec 13 '15 at 15:26
  • I didt see, method close in BitmapImage – Alex Repeckiy Dec 13 '15 at 15:27
  • Do you need to save out the final bitmap? If you only need to display it WPF can perform the skew and transform operations right in the XAML (I don't know if you can save the result of that or not to a file.) – Scott Chamberlain Dec 13 '15 at 15:31
  • I do transform, then a take pixels (after transform), and take pixel color, then i work with this data. If i only display transform, i take pixels without transform manipulation. I need save out bitmap, i i have few steps, Click to btn, skew, click btn, skew, crop, then click btn skew, then take pixels. My app, automates the physical calculated numbers , deciphering the spectrum, I transform , I crop images after allocate lines that I have , I take the pixels of these lines , and build graphics. – Alex Repeckiy Dec 13 '15 at 15:42
  • You can see, i have few arrows.There are top,bottom.left, right. Its skew transform. I have crop. I need work with image, and save all manipulation – Alex Repeckiy Dec 13 '15 at 15:47

0 Answers0