new(github.com/J-Siu/go-png2ico): PNG → ICO CLI in pure Go#13678
Merged
Conversation
Small CLI that reads one or more PNG files and writes a Windows .ico container with the standard `00 00 01 00` header (icon type). Useful for favicon/branding pipelines that only have PNGs on hand. - Pure Go (CGO=0), no runtime deps - Builds against go.dev ^1.26; linux uses -buildmode=pie to avoid the well-known Go+glibc segfault noted upstream (docker-library/golang#402) - Test 1 asserts `--version` reports the built tag - Test 2 base64-decodes a 1x1 PNG, runs the round-trip, checks the ICO magic bytes Verified locally on darwin/arm64 against upstream v2.0.8: $ go-png2ico --version go-png2ico version v2.0.8 $ printf '%s' 'iVBORw0…' | base64 -d > one.png $ go-png2ico one.png out.ico $ od -An -tx1 -N4 out.ico | tr -d ' \n' 00000100
Updated build script and test commands in package.yml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.ico(magic00 00 01 00). Useful for favicon / branding pipelines that only have PNGs on hand.go.dev ^1.26; linux uses-buildmode=pieto avoid the well-known Go+glibc segfault noted upstream (docker-library/golang#402).Tests in the recipe
go-png2ico --versionreports the built tag.Local verification (darwin/arm64, upstream v2.0.8)
Test plan
--versionoutput matches{{version.tag}}