-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Image Cropping: PNG is converted to JPG #17817
Comments
@criticalAY FYI |
that's unexpected, we just worked near this area and did a lot of cropping / crop preview display etc work and the idea was to leave the source images less-transformed. We should leave PNG as PNG |
I think having basic crop built in is nice, and it should work. It can already always be delegated to a "proper editor" (whatever that is? an endless discussion there...) by any user if they unbundle their image acquisition steps to "open camera, take photo, open editor, edit, save photo, then open ankidroid and attach that image". This is easy to understand ("just use your existing apps to do what you want then attach the result") vs a bunch of custom app picker work in AnkiDroid. I don't have any appetite for that... What's missing is setting the output format, others have had this issue: CanHub/Android-Image-Cropper#289 (comment) If you don't set it, you get JPG by default, which will naturally not have any transparency etc as the format doesn't support it |
i will work on the issue. |
So upon inspection i found that we use a library
|
@Scapesfear so upon inspection you found exactly what I wrote in the above comment? That's amazing |
@mikehardy, Love the sarcasm, actually! I went through a lot of references (#17020 -> (#16798 && #17014)) and got pretty deep into them. But then I thought, why not dive straight into the codebase and figure it out from there? Looks like I missed checking out your reference! If I had gotten stuck, I would’ve definitely taken a closer look at it. P.S: Sorry for not looking at it. It would have saved some time. |
For what it's worth, I found it in about 5 seconds by just doing a repo search for PNG. Popped up immediately that it was an output format specification we were missing --> https://github.com/search?q=repo%3ACanHub%2FAndroid-Image-Cropper+png&type=code |
Checked for duplicates?
Does it also happen in the desktop version?
What are the steps to reproduce this bug?
Expected behaviour
The image is silently converted to JPG. This would've been fine normally but I'm working with transparent images so JPG doesn't work for me. I expect one of these to happen instead:
Debug info
(Optional) Anything else you want to share?
No response
Research
The text was updated successfully, but these errors were encountered: