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

Add PNG file extension #10

Merged
merged 2 commits into from Oct 29, 2021
Merged

Add PNG file extension #10

merged 2 commits into from Oct 29, 2021

Conversation

ghost
Copy link

@ghost ghost commented Sep 11, 2021

Fixes #9

@ghost
Copy link
Author

ghost commented Sep 11, 2021

Additionally, as screenshots captured in PNG why there image/jpeg MIME-Type used in few places?

@rosenpin
Copy link
Owner

Thanks for the PR :)

This doesn't seem right.
On my device (Android 11) the screenshots are saved correctly as jpeg.
Your PR would change the name of the screenshot, I didn't test it but on Android Q+ it might result in jpeg images called "screenshot-.....png.jpg"
Please test it on an Android 11 emulator and let me know if I'm wrong.
Alternatively, only apply your solution to old Android versions (Q- not included)

@ghost
Copy link
Author

ghost commented Sep 12, 2021

I'm not be able to run any emulator.

On my device (Android 11) the screenshots are saved correctly as jpeg

But how, as app capture as PNG? Does on Android 11 it saves to folder it as JPEG? (actually on my Android 6 screenshots saves into "Pictures > Screenshots" are exactly PNG as I see in image quality & in file headers via Hex-editors)

BTW, As I see in "Screenshot Assistant" app (which is designed to store only JPEG screenshots) it uses Screenshot-${currentDateString()}.${imageFormat.fileExtension} for adding file extension.

@rosenpin
Copy link
Owner

rosenpin commented Sep 12, 2021

Thanks for the detailed response.
Seems like you're right
image

I'm not sure because I really don't remember a whole lot from this project, but I assume this line should be changed:

put(MediaStore.MediaColumns.MIME_TYPE, "image/jpeg")

And potentially also this:

Otherwise I really don't know where the .jpg suffix appear on my device

@rosenpin rosenpin merged commit c9e6a13 into rosenpin:master Oct 29, 2021
@ghost
Copy link
Author

ghost commented Oct 29, 2021

Thanks! May you add also app-release.apk asset to 2.0 release?
Can't wait to test! (F-Droid packaging is slow)

@rosenpin
Copy link
Owner

Actually I lost the keystore for this app, that's the reason the play store version is outdated by the way.
I'll upload an unsigned version of the app

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 this pull request may close these issues.

Files being saved without an extension
1 participant