tgstation / rust-g

Rust based libraries for tgstation
MIT License
28 stars 100 forks source link

Pallette Encoding Image Fix #107

Closed ZeWaka closed 2 years ago

ZeWaka commented 2 years ago

Should copy palette information over for the metadata stripping operation now so the encoding doesn't fail.

Rant Annoyingly, the `png` changelog didn't hint at this palette issue - though I'm not entirely sure how it was getting the info before. Nor do I think it's the difference between `png::Info` vs `png::OutputInfo`. Probably some internal mechanism for checking it got changed and our produced images had no palette information before.

Also threw in a zTxt copy mechanism if at some point we want it, because we now have access to that information there and it's possible in the new library version.

Fixes issue brought up in: https://github.com/tgstation/tgstation/pull/68690

ZeWaka commented 2 years ago

also this fix works, will merge tomorrow and cut release https://github.com/ZeWaka/tgstation/pull/2 (ignore the dumb tramstation random error)