Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken jpg and strange decoding #1

Open
smarttty opened this issue Apr 12, 2018 · 4 comments
Open

Broken jpg and strange decoding #1

smarttty opened this issue Apr 12, 2018 · 4 comments

Comments

@smarttty
Copy link

Hey! After encoding, i have broken jpeg. Its HEX contains only 0x31 and 0x30. After decoding i have a very bad image. Help)

@LovelyBuggies
Copy link

Same condition, too! And I wondered why I got a larger jpeg... 😩

@smarttty
Copy link
Author

smarttty commented Nov 6, 2018

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.

@ghallak
Copy link
Owner

ghallak commented Nov 7, 2018

@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.

@ghallak ghallak closed this as completed Nov 7, 2018
@ghallak ghallak reopened this Nov 7, 2018
@jindalakshunn
Copy link

Hey, the reason for all that is because the decoder assumes a square image even though there is no such restriction on encoder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants