Comments (1)
Being more verbose is more informative:
$ ./rgbgfx -vvvvv -Z -o cursor.2bpp cursor.png
rgbgfx v0.6.1-119-g528a4c0b
Options:
Visit image in column-major order
Bit depth: 2bpp
Maximum 8 palettes
Palettes contain 4 colors
No palette spec
Input image slice: 0x0 pixels starting at (0, 0)
Base tile IDs: [0, 0]
Maximum 65535 tiles in bank 0, 0 in bank 1
Input image: cursor.png
Output tile data: cursor.2bpp
Ready.
Using libpng 1.6.37
Reading tiles...
Opened input file
PNG header signature is OK
Input image: 48x48 pixels, 2bpp palette, not interlaced
rgbgfx: src/gfx/process.cpp:262: Png: Assertion `nbTransparentEntries == nbColors' failed.
Aborted (core dumped)
This is the assertion being violated:
if (png_get_PLTE(png, info, &embeddedPal, &nbColors) != 0) {
int nbTransparentEntries;
if (png_get_tRNS(png, info, &transparencyPal, &nbTransparentEntries, nullptr)) {
assert(nbTransparentEntries == nbColors);
}
https://www.nayuki.io/page/png-file-chunk-inspector reports this from the chunk data:
- The
IHDR
chunk defines color type 3, an indexed palette - The
PLTE
chunk defines 4 colors:#000000
,#346856
,#88C070
, and#E0F8D0
. - The
tRNS
chunk defines 1 alpha value:$00
This is valid:
For colour type 3 (indexed-colour), the
tRNS
chunk contains a series of one-byte alpha values, corresponding to entries in thePLTE
chunk. Each entry indicates that pixels of the corresponding palette index shall be treated as having the specified alpha value. Alpha values have the same interpretation as in an 8-bit full alpha channel: 0 is fully transparent, 255 is fully opaque, regardless of image bit depth. ThetRNS
chunk shall not contain more alpha values than there are palette entries, but atRNS
chunk may contain fewer values than there are palette entries. In this case, the alpha value for all remaining palette entries is assumed to be 255. In the common case in which only palette index 0 need be made transparent, only a one-bytetRNS
chunk is needed, and when all palette indices are opaque, thetRNS
chunk may be omitted.
from rgbds.
Related Issues (20)
- Why canβt use newer 7.0version in nix HOT 3
- Security vulnerability through fuzzing HOT 1
- Allow a color in an inline palette spec to be `none`
- Make sure rgbasm and rgblink report "`<stdin>`" or "`<stdout>`" for `-` as appropriate
- Missing contributing documentation
- INCHARMAP doesn't always produce correct output HOT 1
- Refactoring and style cleanup with C++ HOT 3
- Don't `#include <stdbool.h>`
- Accept multiple exported constants if they agree on a value HOT 3
- Run `strip` on binaries before publishing them
- Associate sizes with labels, and add a new way to delimit those sizes HOT 3
- Check .sym file reported addresses and sorting HOT 4
- CI should verify ROM hashes for all projects
- .sym files are not sorted in ascending order
- Fix CI with Ubuntu 22.04 HOT 3
- `\@` in an `INCLUDE`d file increments at its EOF unless inherited from a parent context HOT 1
- Performance improvements for C++
- math.asm test failure with armv7a-unknown-linux-gnueabihf HOT 6
- can't build HOT 1
- [Feature request] Choose padding byte while using `rgblink`'s overlay feature
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rgbds.