rosenpin / screenshot-sharer

A quick & easy way to share screenshots on Android
https://f-droid.org/en/packages/io.rosenpin.screenshotsharer/
GNU General Public License v3.0
17 stars 7 forks source link

Add PNG file extension #10

Closed ghost closed 3 years ago

ghost commented 3 years ago

Fixes https://github.com/rosenpin/screenshot-sharer/issues/9

ghost commented 3 years ago

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

rosenpin commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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: https://github.com/rosenpin/screenshot-sharer/blob/6b57f7a9acb5c08e1f67d19906a61285402106b9/app/src/main/java/com/tomer/screenshotsharer/AssistLoggerSession.kt#L100

And potentially also this: https://github.com/rosenpin/screenshot-sharer/blob/6b57f7a9acb5c08e1f67d19906a61285402106b9/app/src/main/java/com/tomer/screenshotsharer/AssistLoggerSession.kt#L156

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

ghost commented 3 years ago

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

rosenpin commented 3 years ago

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

rosenpin commented 3 years ago

https://github.com/rosenpin/screenshot-sharer/releases/download/2.1/app-debug.apk