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

PNG files get saved as a JPG. #40

Open
noirscape opened this issue Mar 26, 2016 · 2 comments
Open

PNG files get saved as a JPG. #40

noirscape opened this issue Mar 26, 2016 · 2 comments

Comments

@noirscape
Copy link

All png files I download are saved with a .jpg extension. I have to run http://askubuntu.com/a/631914/376812 to fix the filetype.

@rachmadaniHaryono
Copy link
Contributor

hi, i make simple fix for this, but it still have some limitation. this only apply to imgur link especially png image with jpg file extension. this may cause effect with resume function.

can you check it if it meet your needs?

@roperi
Copy link

roperi commented Sep 10, 2016

@rachmadaniHaryono, @ev1l0rd

This is a big problem for me as most of my target images are imgur based and I am missing more than 70% of them.

This is what happens (this is just an example though):

Attempting to download URL[http://imgur.com/qDZAdas.jpg] as [1231jb.jpg].
Sucessfully downloaded URL [http://imgur.com/qDZAda.jpg] as [1231jb.jpg].

It seems everything is ok, right? Nope. The downloaded file is actually corrupted and it can't be read. It seems when an user uploads a large PNG to the imgur server it gets converted into a JPG image (see here).

Now if you go directly from your browser to an image URL (again, this is an example):

http://imgur.com/qDZAdas.jpg

...and right click on it and save it to your hard drive image would be saved as a PNG one. Actually, if you right click and check image properties it will show you is a PNG image type.

So one would think that if I rename the extention of my downloaded JPG to PNG it would be back to normal. Nope. Renaming doesn't changes anything.

What do you guys think? Is there a way to dynamically rename image based on its real image type?

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

Successfully merging a pull request may close this issue.

3 participants