Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Images always come out as JPEGs internally #75

Open
henrik-leppa opened this issue Aug 5, 2020 · 1 comment
Open

Images always come out as JPEGs internally #75

henrik-leppa opened this issue Aug 5, 2020 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@henrik-leppa
Copy link

Thank you for creating this wonderful app.
👍
There is one problem I’ve found:

  1. I take a screenshot.
  2. I choose PNG as the format.
  3. I share it with my computer using Bluetooth.
  4. I open it with an image viewer.
  5. The image viewer says that the file is not a valid PNG.
  6. I open the image with a hex editor.
  7. The first letters in the file are: JFIF (indicating the file is actually a JPEG), when the first letters should be: PNG.

I did the same thing but chose WEBP as the format, but the file still started with: JFIF, instead of something like: RIFFr WEBPVP8.

I also redid both of the aforementioned actions, but shared the file using Phone Saver (version 5.2.1), but the same thing happened.

It seems that the file always comes out as a JPEG on the inside, and only the file extension (.jpeg, .png, .webp) changes.

(Note: Most programs (like the web browsers) are coded the silently ignore a disparity between file extension and contents, which might have masked this issue.)

I am using F-Droid Screenshot Assistant (version 2.0.1), with Android 9.

If you need more diagnostics information, just ask.
🙂

@beatbrot
Copy link
Owner

beatbrot commented Aug 7, 2020

What an insanely good catch! Already found the problematic code section. I am currently wrinting my master's thesis though, so its really hard to find the time.

It may take me some time to squeeze this in. I am however always open to good pull requests :P

@beatbrot beatbrot added bug Something isn't working good first issue Good for newcomers labels Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants