Skip to content

Porting system.drawing to imagesharp #2867

Closed Answered by JimBobSquarePants
raiserle asked this question in Q&A
Discussion options

You must be logged in to vote

The problem lies in how ImageSharp handles stride and padding compared to System.Drawing. Your code assumes GDI+ (System.Drawing) behavior, which enforces that each row of pixel data is aligned to a 4-byte boundary. However, ImageSharp does not require such padding for rows, and the pixel data should be tightly packed with no extra padding bytes between rows.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by raiserle
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants