Replies: 3 comments 7 replies
-
Your code looks correct, one remark (unrelated to the question) that you should make sure you also dispose
What do you mean by changing? Do you have different pixel data in the re-saved image? What is the format of |
Beta Was this translation helpful? Give feedback.
-
the test1.png and test2.png images are slightly different, without any modification. Also note that test2.png is 29kb vs 25kb on test.png. Edit: i've figured out the issue with test3.png vs test4.png. The GetBuffer() is a very dangerous method, since it returns more than only the contents, but also some reserved capacity, hence you should call ToArray() instead. I think there still is a minor issue with test1.png and test2.png though, since these should be the exact same image. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use image sharp instead of System.Drawing, but noticing some larger file sizes and slightly different images. Could anyone advise how to rewrite this piece of code?
I current am using the following code to replace it:
ps. I've also noticed that simply loading an image and saving it again already changes it, which is rather weird?
Beta Was this translation helpful? Give feedback.
All reactions