Fix PNG color type read#2443
Conversation
The color type is the byte at offset 9 in the IHDR PNG chunk (offset 13 from the chunk size and 25 since the start of the file). Shumway was incorrectly reading the byte 10 corresponding to the compression method.
|
You can make that against https://github.com/ivanpopelyshev/shumway , it supports latest typescript version. UPD. I've added this fix manually :) |
|
Thanks for the reply. I noticed your project previously but it has a lot of changes and I haven't time to review it. I am myself working on a player based off Shumway (Open Flash) but I have larger architectural changes (to support Rust/Wasm but also reuse only some parts for other tools). That's how I found the issue. Still, Shumway does not seem to use this info in the end because it resorts to the browser's parser and does not use the image size before the image is loaded. |
|
I have two branches there - one "master" thats just updated to latest typescript, and one WIP refactoring that i didnt finish yet. Its supposed to be new pixi plugin :) |
The color type is the byte at offset 9 in the IHDR PNG chunk
(offset 13 from the chunk size and 25 since the start of the file).
Shumway was incorrectly reading the byte 14 corresponding to the
compression method.