Skip to content

Modifying byte array directly behaves weird. Am I doing something wrong? #1968

Answered by hverases
hverases asked this question in Ideas
Discussion options

You must be logged in to vote

After some struggle I finally have my little app ported from Magick.NET to ImageSharp, working fine and taking about 10% of the original Magick.NET version disk space. And it also works fine both in Windows and Linux (Ubuntu 21.04).

Answering myself, I was doing MANY things wrong. While Magick.NET does all the bit depth and color mode conversions between formats automatically, in Imagesharp you have to do it manually, and bit depth it's not the same concept for bmp and png files. As an example, in bmp format an ARGB image is 32 bit depth but the equivalent in png is the combination of 8 bit depth and ARGB color mode. And I was initially converting the original ARGB png to 8 bit indexed co…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@hverases
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by hverases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants