N
N
night_breeze2019-06-26 13:44:08
JavaScript
night_breeze, 2019-06-26 13:44:08

Why is base64 encoded image not showing in Google Chrome and Firefox?

I have the following b64 encoded image that is returned from the server:
https://codepen.io/anon/pen/bPoEEB
The image renders correctly in Safari but does not render in Chrome and Firefox. I also tried to draw it in canvas, but the problem was not solved.
This problem does not only affect this particular image, but all that are returned from the server.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2019-06-26
@night_breeze

Wangyu, this is due to the fact that there is not a JPEG inside, but a TIFF.
And the HEX editor hints at this (I don’t see the JPEG file signature point-blank there), and XnView in the properties gives this:
eceewwqsqb0jwal1fwbs7zk3prq.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question