Skip to content

Convert some graphics to 2 bpp Grayscale#143

Merged
Rangi42 merged 1 commit intopret:masterfrom
Narishma-gb:gifs
Dec 19, 2025
Merged

Convert some graphics to 2 bpp Grayscale#143
Rangi42 merged 1 commit intopret:masterfrom
Narishma-gb:gifs

Conversation

@Narishma-gb
Copy link
Contributor

Some of the gifs in gfx/ use RGB or GRAY 8 bpp encoding, some also with alpha. This changes them all to 2 bpp GRAY.
Most of the files deflate in size except gfx/pikachu/unknown_e40cc.png, which was previously 8 bpp gray, and probably used a better compression algorithm. I used ImageMagick to output the files.

Copy link
Member

@Rangi42 Rangi42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% find gfx -name '*.png' -exec file {} \+ | \grep -v ', [12]-bit grayscale, non-interlaced' | sort 
gfx/diploma/diploma.png:                    PNG image data, 128 x 64, 8-bit/color RGBA, non-interlaced
gfx/intro/clouds.png:                       PNG image data, 16 x 32, 8-bit/color RGBA, non-interlaced
gfx/pikachu/unknown_e40cc.png:              PNG image data, 40 x 8, 8-bit grayscale, non-interlaced
gfx/pikachu/unknown_e41d2.png:              PNG image data, 40 x 16, 8-bit grayscale, non-interlaced
gfx/pikachu/unknown_e444b.png:              PNG image data, 40 x 32, 8-bit grayscale, non-interlaced
gfx/pikachu/unknown_e4a99.png:              PNG image data, 40 x 16, 8-bit grayscale, non-interlaced
gfx/pokemon/front/electrode.png:            PNG image data, 40 x 40, 8-bit/color RGB, non-interlaced
gfx/sprites/bulbasaur.png:                  PNG image data, 16 x 48, 8-bit/color RGBA, non-interlaced
gfx/sprites/chansey.png:                    PNG image data, 16 x 48, 8-bit/color RGBA, non-interlaced
gfx/sprites/clefairy.png:                   PNG image data, 16 x 48, 8-bit/color RGBA, non-interlaced
gfx/sprites/james.png:                      PNG image data, 16 x 96, 8-bit/color RGBA, non-interlaced
gfx/sprites/jessie.png:                     PNG image data, 16 x 96, 8-bit/color RGBA, non-interlaced
gfx/sprites/jigglypuff.png:                 PNG image data, 16 x 48, 8-bit/color RGBA, non-interlaced
gfx/sprites/oddish.png:                     PNG image data, 16 x 48, 8-bit/color RGBA, non-interlaced
gfx/sprites/officer_jenny.png:              PNG image data, 16 x 96, 8-bit/color RGBA, non-interlaced
gfx/sprites/pikachu.png:                    PNG image data, 16 x 96, 8-bit/color RGBA, non-interlaced
gfx/sprites/question_mark.png:              PNG image data, 16 x 16, 8-bit/color RGBA, non-interlaced
gfx/sprites/sandshrew.png:                  PNG image data, 16 x 48, 8-bit/color RGBA, non-interlaced
gfx/sprites/surfing_pikachu.png:            PNG image data, 16 x 96, 8-bit/color RGBA, non-interlaced
gfx/title/pokemon_logo_japan.png:           PNG image data, 128 x 48, 8-bit/color RGBA, non-interlaced

Nice catch! Note that https://github.com/pret/gb-asm-tools has palfix.py which can also help with this sort of thing.

@Rangi42 Rangi42 merged commit 3550c4c into pret:master Dec 19, 2025
1 check passed
@Narishma-gb
Copy link
Contributor Author

Wow, I didn't know you could grep that sort of things! I had to use a small c script to sort and peek inside the png headers. Thanks!

@Narishma-gb Narishma-gb deleted the gifs branch December 19, 2025 17:44
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