Closed troke12 closed 3 years ago
The problem here is that https://a.troke.id/2 is a PNG file with bit depth 16, which Cairo seems to not support according to your try.
You can try https://cdn.skyra.pw/skyra-assets/coins_heads.png (which has a bit depth of 8) and you'll see it works.
The only thing I can think of to fix this, is that you can use GIMP or any other image editing tool to export it as a PNG with bit depth 8, then it'll work.
Starting with canvas-constructor v5 - which I hope to get ready for next week - you'll be able to use an alternative render engine which does support bit depth 16 (and presumably 24 as well).
ah i see, i try it and it's worked, seems like i need to refactor again my avatar server, thank you very much!
Glad I could help!
For future reference, I used https://www.metadata2go.com to read the PNG's metadata, since I don't have my local tool around :)
Describe the bug
The image when we get using
resolveImage
sometimes broken and sometimes normalThe first one (https://a.troke.id/2) broken
The second one (https://a.troke.id/1) normal
Code :