Can't properly load grayscale JPEG
Closed this issue · 0 comments
ideal-fire commented
JPEG images that are grayscale display at a fraction of their correct width for some reason. Around 1/3 their correct width, I think. I don't know much about the JPEG format, but 1/3 of the correct width makes me think that one byte per pixel is being used instead of 3, which is possible because the only colors are shades of black.
Here's what it looks like when I display the grayscale JPEG:
https://i.imgur.com/0U9qBxg.jpg
Here's that same image displayed, but it's a regular JPEG:
https://i.imgur.com/wyxkMnQ.jpg
Code I used:
https://pastebin.com/mXqKzhPU
The actual image:
https://www.dropbox.com/s/coa91s1jw1qcwau/test.jpg?dl=0