Open ujjwalagrawal17 opened 6 years ago
@shankarpriyank Do you mean that LLJTran may be faster? If you mean something else, please post the facts here and be explicit, thanks :-) Also, where does the 15 seconds
figure comes from? jpegtran takes around one second to transform a large picture.
@nicolas-raoul In this thread if you read the top-rated answer, a developer is telling that it is taking around 15 seconds for the transformation to complete. I did not test anything myself, just sharing what's written in that thread.
I guess I will try making a sample out and report out my findings.
Hey @nicolas-raoul I am making sample/poc app for lossless transformations, just wanted to confirm once if this issue can be fixed as a project under GSoC 23
Hi @shankarpriyank, thanks for the question! There is an official GSoC task (making upload more reliable), but since you seem to already have experience in the non-trivial field of lossless transformations, you are welcome to create a proposal based on this GitHub issue. Thank you for your interest!
Hi @nicolas-raoul. I made a sample/poc app and tested it. The transformations are very fast, practically there is no delay. Although during the process of making that app, there is one challenge that I identified. We need to discuss the flow of the transformations or the permission handling. Basically with the security updates coming in android now if you want to edit any media file which is not of the app itself the app will need to ask for extra permissions(https://developer.android.com/training/data-storage/shared/media#update-other-apps-files). But there is no need for this permission if you do not want to modify the original file. We can just save a new transformed image. I also had a look at #2542 the pr seems really nice and I think we can follow the same approach to implement the crop feature. Summing it up we are looking at Crop/Rotate/Blur and we have an implementation strategy ready for Crop and Rotate.
Please let me know your thoughts
@shankarpriyank
I am very happy to hear that performance is good!
About permissions: We already have the picture's full data, for instance we read its binary data to find out whether the picture was downloaded from Facebook or not. So I don't think permissions will be an issue to implement this feature.
Thank you for checking Vanshika's work! As you know, two additional challenges here will be to:
@nicolas-raoul Reading data is one thing and editing it is different if we want to transform the original image I think there will be permission issues coming up, please have a look at this link - https://developer.android.com/training/data-storage/shared/media#update-other-apps-files Sorry, I maybe wrong but can we crop images without bearing any loss?
@shankarpriyank
The good news is that we do not need to open files in write mode. If we have all bits from the image, then we can for instance copy it to another array or temporary file, modify that array as much as we want, then upload that array to the Wikimedia Commons server (in other words: upload the modified file) with no permission issues.
can we crop images without bearing any loss?
Loss in the blurred part is acceptable, but loss far from the blurred parts is not acceptable. Please read this section to understand what is expected. This can be implemented this way:
If this sounds like too much work for a GSoC, feel free to split your GSoC proposal into two parts:
Hey @nicolas-raoul I made a proposal on phabricator, I would be really grateful I you could provide me with some feedback
The app should have image editing features.
Desirable features:
Undesirable features:
Debated: