Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGB Error with 8-bit PNG #2

Open
makeitTim opened this issue Jul 1, 2019 · 3 comments
Open

RGB Error with 8-bit PNG #2

makeitTim opened this issue Jul 1, 2019 · 3 comments

Comments

@makeitTim
Copy link

makeitTim commented Jul 1, 2019

Thanks for the tool! I'm having trouble getting it to work. I keep getting this error:
Error: PNG file is not in the RGB or RGBA format!

Image was made in Adobe Illustrator. I'm exporting as a 8-bit PNG with a transparent alpha background and a palette of 8 colors.

Dimensions: 128x128 (16x32 sprites)
Color space: RGB
Color profile: sRGB IEC61966-2.1
Content Creator: Adobe ImageReady

Command I use:
./png2gba -p man16x32_8bit.png

I tried exporting as 24-bit (although I think I need the palette for the sprite modes I want to use). I also opened it in Photoshop and exported as 8-bit PNG with all sorts of different settings. Everything gets Error: PNG file is not in the RGB or RGBA format!. Unchecking convert to sRGB in Photoshop sometimes gets libpng warning: iCCP: known incorrect sRGB profile.

FYI, the test1.png works.

Any insight? What's the workflow to use this tool?

Thanks!
Tim

@makeitTim
Copy link
Author

I've gotten by that RGB error, by opening in Photoshop and exporting using "Quick Export as PNG", although it's unclear why? It suspect it has more to do with the metadata Adobe sticks in with other exporting methods, and not actually a different color space or encoding?

I haven't gotten the sprites to cut up correctly or transparency to work yet.

@IanFinlayson
Copy link
Owner

Hi Tim,

Sorry, I don't know what the image formatting issue could be. I also don't have a copy of photoshop to test with. If you send me an image which exhibits that problem I could test it. I should eventually just add support for other common PNG image types.

For the sprites, there is a lot of things to get right to make the system work. I made this tool for a class I taught, and I have some course notes on the sprite system here:

http://ianfinlayson.net/class/cpsc305/notes/15-sprites

Maybe you will find them helpful.

@makeitTim
Copy link
Author

Thanks Ian,

I got the basics to work using Photoshop's "Quick Export as PNG" and lining up all the sprites vertically, like your Koopa example. Currently in my build it comes out with pixels all garbled, but I think is expected as I'm learning to work with the modes and bits and stuff.

Those class notes are a super useful reference for learning to play with this GBA stuff. Thanks a lot!

Once I get my own workflow down I hope to post somewhere. I'll keep at it.

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

No branches or pull requests

2 participants