jpeg-python
jpeg-python copied to clipboard
Broken jpg and strange decoding
Hey! After encoding, i have broken jpeg. Its HEX contains only 0x31 and 0x30. After decoding i have a very bad image. Help)
Same condition, too! And I wondered why I got a larger jpeg... 😩
Same condition, too! And I wondered why I got a larger jpeg... 😩
I got it. The output is not jpeg. It's a text file, wich consists of '1' and '0', so, this is why text file is larger then image.
@smarttty When you got a broken JEPG, were you using an image with transparent background? If not, can you post a link to the image that you used?
@LovelyBuggies The reason for the larger JPEG is what @smarttty mentioned:
he output is not jpeg. It's a text file, wich consists of '1' and '0', so, this is why text file is larger then image.
When I wrote this JPEG encoder/decoder, I had in mind that it should be as short and easy to understand as possible, so if you're looking for good performance, you better use something else.
Hey, the reason for all that is because the decoder assumes a square image even though there is no such restriction on encoder.