Skip to content

ICO encoder: Write 1 color plane#3043

Merged
197g merged 1 commit into
image-rs:mainfrom
RunDevelopment:ico-plane-1
Jun 15, 2026
Merged

ICO encoder: Write 1 color plane#3043
197g merged 1 commit into
image-rs:mainfrom
RunDevelopment:ico-plane-1

Conversation

@RunDevelopment

@RunDevelopment RunDevelopment commented Jun 15, 2026

Copy link
Copy Markdown
Member

According to Wikipedia, "Setting the color planes to 0 or 1 is treated equivalently by the operating system". However, I found that there are edge cases where 0 and 1 are not treated equally and only 1 is accepted (the size fallback from #3042 only seems to trigger if wPlanes is 1). The corresponding biPlanes in BITMAPINFOHEADER is also required to 1.

For those reasons, I think our encoder should emit 1 for color planes for best compatibility. This PR implements that.

@197g 197g merged commit dcd7ba1 into image-rs:main Jun 15, 2026
31 checks passed
@RunDevelopment RunDevelopment deleted the ico-plane-1 branch June 15, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants