Page MenuHomePhabricator

GSoC 2022 Proposal - Commons Android app - Transform picture (crop/rotate/etc) within the app
Closed, DeclinedPublic

Assigned To
Authored By
Rishavgupta933
Mar 8 2022, 2:47 PM
Referenced Files
F35034617: untitled@1.25x.png
Apr 2 2022, 5:46 AM
F35029494: untitled@1.25x.png
Mar 30 2022, 6:44 AM
F35029491: untitled@1.25x (1).png
Mar 30 2022, 6:44 AM
F35029500: untitled@1.25x (3).png
Mar 30 2022, 6:44 AM
F35029497: untitled@1.25x (2).png
Mar 30 2022, 6:44 AM
Tokens
"Burninate" token, awarded by Rishavgupta933.

Description

Transform picture (crop/rotate/etc) within the app

Profile :-

Name: Rishav Gupta
Email: rishavgupta933@gmail.com
Education: B-tech (CSE) 2nd year student , Gurunanak Institute of Technology
Linked-in: Rishav Gupta
GitHub : Rishavgupta12345
Other communication modes: Hangouts, discord, Zulip, Slack.
Location during GSoC: kolkata/West Bengal, India

Synopsis:

App
Wikimedia Commons is an Android app by the Wikimedia Foundation that allows users to browse and upload pictures to the Wikimedia Commons repository from phones/tablets. Users can select images from the gallery or directly from the camera for an upload.

Project:
The project is about implementing a feature that allows the user to transform pictures (crop/rotate/etc) within the app.
Issue link: https://github.com/commons-app/apps-android-commons/issues/1192

Implementation:

To be implemented :-
  • Feature that allows the user to transform pictures (crop/rotate/etc) within the app :- While uploading any image in Wikimedia the user will be given an edit option where the user can edit the picture according to the need.
  • Procedure :- In the current state of the app, MainActivity calls handleActivityResult and FilePicker.handleActivityResult pick images from camera/gallery and put the image URIs in a class called UploadableFile. After that, the List<UploadableFile> was sent to UploadActivity from where the rest of the work happens for each UploadableFiles more specifically URIs. I will implement an edit button on UploadActivity from where a new Activity will open where each URI of UploadableFile can be cropped or blurred and modify the List<UploadableFile> with new URIs by replacing old ones and also display edited images in UploadActivity. Then UploadActivity will run as it is.
Mock UI :-

Screen 1 :

untitled@1.25x (1).png (1×516 px, 207 KB)

While uploading the photo a new EDIT button will be added, clicking on which all the required edit features will be visible to the user

Screen 2 :

untitled@1.25x.png (1×526 px, 344 KB)

Example of all the features which will be displayed to the user for editing the photo

a) Crop feature :

untitled@1.25x (2).png (1×525 px, 305 KB)

For crop I will be using LLJTran MediaUtil API library. It's a well-maintained lossless library for cropping images. I will take the image URI from UploadableFile and crop it. I will also design the UI of this Activity according to App Theme.

b) Rotate feature :

untitled@1.25x (3).png (1×506 px, 329 KB)

I will use LLJTran LLJTran MediaUtil API to rotate an image 90 degrees.

c) Blur feature :

untitled@1.25x.png (1×500 px, 279 KB)

I thought about the idea to do it which I think is more efficient is that I will store some blur or pixel blur images in the asset folder. The blurry assets will be of different sizes like oval, circle, square, rectangle. Users can pick those assets from a drop bottom-up menu and resize the picked asset and put the asset on that part of an image that is hidable according to user and make a new image URI with the added asset. We will do everything converting into a bitmap. Thus A new image URI we will get with blurred image.

Further implementation :-

I will discuss with the mentors about the other features like contrast, EXIF, etc which they want to be implemented in the app. And implement them in the app according to their need.

Mentors :

@Nicolas_Raoul
@Madhurgupta10
@AdityaSrivastav2009

Timeline :

TimeframePeriodTask
Community Bonding PeriodMay 20, 2022-June 12, 2022Get to know mentors and community, Reading the documentation, Familiarize with app structure, Reading about Commons API.
DeliverableCommunity bonding report, Blog
Week 1June 13, 2022-June 19, 2022Create UI of EditActivity .
(SubTask)Discuss and Complete the EditActivity UI
(SubTask)Add three tabs in EditActivity for crop,blur and rotate.
(SubTask)Link the EditActivity with UploadActivity via a button.
(SubTask)Test the implementation till now.
Week 2June 20, 2022-June 29, 2022Unavailable due to exams
Week 3June 30, 2022-July 6, 2022Unavailable due to exams
Week 4July 7, 2022-July 13, 2022Implement Crop Feature.
(SubTask)Implementation of LLJTran MediaUtil API
(SubTask)Implementation of Crop Feature.
Week 5July 14, 2022-July 20, 2022Test crop feature and bug fix.
(SubTask)Test of the implementation
(SubTask)Bug fix.
(SubTask)Blog post
Week 6 First Evaluation.July 21, 2022-July 27, 2022UI of Updates
(SubTask)First Evaluation
(SubTask)Discuss and Complete UI of all edit screens
(SubTask)Test of the implementation and bug fix
Week 7July 28, 2022-Aug 3, 2022Implement Blur Feature.
(SubTask)Implementation of blur feature
(SubTask)Test blur effect and bug fix.
Week 8Aug 4, 2022-Aug11, 2022Implement Rotate feature
(SubTask)Implementation of LLJTran MediaUtil API
(SubTask)Implementation of Rotate feature
Week 9Aug 12, 2022-Aug 19, 2022Test rotate feature and bug fix.
(SubTask)Test of the implementation
(SubTask)Bug fix
Week 10Aug 20, 2022-Aug 27, 2022Implement Update Depicts (Bonus - if time allows)
(SubTask)Implement classes and Adapters for depicts and make the API call with existing post functions
(SubTask)Linking the UI with update depicts and display changes
(SubTask)Started work on other updates UI
Week 11Aug 28, 2022-Sept 4, 2022Finish All Update Feature
(SubTask)Take the new string from user for title/description, coordinates and replace old data with new one and update by doing the API calls with existing post functions
(SubTask)Write tests using JUnit
(SubTask)Tests for this implementation and bug fix
(SubTask)Writing proper documentation
Week 12 Final Evaluation.Sept 5, 2022-Sept 12, 2022Finish all over tasks and bug fixes
(SubTask)Overall Tests
(SubTask)Remaining Bug fix and suggestions
(SubTask)Finishing up documentation
(SubTask)Overall Blog post
(SubTask)Final Evaluation
Note :-

This year GSOC allows the student to extend the 12-week program to a 22-week program if allowed by the mentor of the organization. So, I would like to further implement the contrast, EXIF hiding features if possible.

About Me :

I'm Rishav Gupta, a sophomore studying Computer Science and Engineering at Gurunanak Institute of Technology in India (expected 2024). I am an active member of my college's BitByte Coding club. My interest in Android development grew as I progressed through college. In addition, I worked on a variety of self-made and open source projects. This aided me in gaining a thorough understanding of the subject.

I enjoy singing and listening to music. Photography and photoshop experiments are two of my favorite pastimes. In my spare time, I enjoy reading self-help books and solving Rubix cubes.

Availability :

  • Are you eligible for Google Summer of Code ? I’ve read the eligibility criteria and I am eligible to apply for Google Summer of Code.
  • Do you plan to submit any other proposal apart from this one ? No, I am only submitting this proposal.
  • Do you have any other plans during the period of GSoC ? Yes, I will have my 4th-semester exams in June, so I might miss 10-12 days.
  • How many hours can you dedicate to this ? I’ll be able to give 40+ hours per week. If required I can put in more time to finish up the goals for the week.
  • Have you been selected to GSoC before? No, this is my first time participating in GSoC.

What Excites me about this project:

Photography is one of my greatest passions, and photoshop is one of my favorite pastimes. That is the primary reason I contribute to WIKIMEDIA and chose it as my GSoC project. Wikimedia is all about media and photographs, which is exactly what I am interested in. As a result, the project to include photo transformation and editing within the app is the perfect match for my interests and abilities.

Why should I be selected for the project :

  • Skill :- Android development is a hobby of mine. I've spent a lot of time working on Android projects and am well familiar with its architecture. I am well-versed in the Java/Kotlin programming language and am conversant with the latest Android technology. In Android, I am familiar with the API and caching. I've built an app using a professional MVVM architecture and am familiar with the Jetpack libraries. I know Datastructures and Algorithms (DSA) and Databases and Management Systems (DBMS) because they are part of my degree curriculum. In addition, I am a Photoshop expert. As a result, I believe I possess the ideal set of skills for this project.
  • Knowledge:- Since January 2022, I've been working on the Commons Android project. To make the project repository clearer, I fixed a lot of issues, reported a few, assisted maintainers with reviews, and cleaned up 50+ old issues.

Past Experience :

I’ve worked on many Android applications and is learning Android dev for a year now. I’ve contributed and collaborated on several open-source projects. I am familiar with git, GitHub, and version control.

  • PROJECTS :
  • WINNER OF HACKTOBERFEST 2021 :
    • Got merged 4 Pull requests. Contributed to various projects.
  • WINNER OF IIT KHARAGPUR WINTER OF CODE 2021 :
    • Worked on different projects under IIT Kharagpur and merged 4 pull requests.

Relevant Skills

  • Familiar with Android architecture components
  • UI design in Android.
  • Android SDK.
  • Jetpack library.
  • GitHub and git Version control.
  • Unit Tests in Android.
  • Can work on both JAVA/KOTLIN

Contributions to Wikimedia Commons

PULL REQUESTS

  • Total = 11
  • Merged = 9
  • Open = 2
PR LINKTITLESTATUSMY LEARNING
#4873Copyright warning for beta flavormergedadding popup feature was something I learnt new while solving this issue
#4882Add link to user guide in Aboutmergedlearned about adding hyperlink into the app
#4863The empty screen while no images found in custom picture selectormergedthis issue made me struggle a lot but was simple and taught me never to give up
#4884The empty screen while no images found in custom picture selector [bug]mergedtest failed from above pull request , entirely a new experience, I learned the importance of UnitTesting
#4860could be success could be failuremergedsmall mistake in a string can make a entire app Un-functional
#4890[Bug]: UnknownFormatConversionException: Conversion = 'এ'mergedagain a small string mistake made the app unfunctional, solved easily
#4789Fix warnings for ImageFileLoader.ktmergedfixing warnings using the Android studio suggestion itself
#4899Prod/beta flavor messages may be nonsense for usersmergedadded quality information for users
#4915Improve review feature documentationmergedgot some insights about showing popup dialog
#4920Replace toasts with snackbars where appropriateopengot to know about the working of snackbars
#4766Make the app more accessible - content descriptionopenuse of adding content discription

ISSUES CREATED

ISSUE LINKTITLESTATUS
#4887Clear the old issues in this repositoryopen
#4894[Bug]: language Bengali has many string problemsopen

OTHER TASK

This is an entirely distinct type of contribution that one can make to an organization. While looking for issues to work on, I discovered that WIKIMEDIA's current repository is clogged with obsolete and irrelevant issues. When I first started working, there were 550+ issues. As a result, I decided to alert our organization's mentors about them so that they could review and close those issues. And I was able to resolve approximately 45+ issues.

  • Links :-

#4498 , #4709 , #4459 , #4443 , #4594 , #3066 , #3917 , #3607 , #2919 , #2836 , #4398 , #4866 , #4598 , #4307 , #4388 , #4269 , #4234 , #4131 , #3956 , #3987 , #3394 , #2950 , #2920 , #2910 , #3247 , #3208 , # 2785 , #4676 , # 3871 , #4670 , #3777 , #3246 , #2002 , #2747 , #2891 , #3123 , #3204 , #3431 , #3663 , #3866 , #3907 , #3951 , #3968 , #4209

Event Timeline

Rishavgupta933 renamed this task from GSoC 2022 Proposal [DRAFT] - Commons Android app - Improve the custom picture selector to GSoC 2022 Proposal - Commons Android app - Transform picture (crop/rotate/etc) within the app.Apr 2 2022, 5:56 AM
Rishavgupta933 awarded a token.

Thank you for the detailed proposal, with screenshots and a timeline.

When you write "rotate", it is about 90 degrees rotations, right? (90 degrees rotation is enough for us, free angle rotation is not needed nor really desirable in the app as it would lose some corners data)

Ucrop crop is not lossless, unfortunately. This proposal would be much more attractive if it was about lossless crop, as picture quality is very important on Commons. Maybe https://github.com/bkhall/AndroidMediaUtil could be used? It implements rotate and crop: https://github.com/bkhall/AndroidMediaUtil/blob/master/src/android/mediautil/image/jpeg/LLJTran.java#L188

Minor style improvements:

android -> Android
commons -> Commons
to Transform -> to transform
Github -> GitHub

Thank you for the detailed proposal, with screenshots and a timeline.

When you write "rotate", it is about 90 degrees rotations, right? (90 degrees rotation is enough for us, free angle rotation is not needed nor really desirable in the app as it would lose some corners data)

Ucrop crop is not lossless, unfortunately. This proposal would be much more attractive if it was about lossless crop, as picture quality is very important on Commons. Maybe https://github.com/bkhall/AndroidMediaUtil could be used? It implements rotate and crop: https://github.com/bkhall/AndroidMediaUtil/blob/master/src/android/mediautil/image/jpeg/LLJTran.java#L188

Minor style improvements:

android -> Android
commons -> Commons
to Transform -> to transform
Github -> GitHub

Thanks for the feedback,
I read the documentation you provided and I can replace Ucrop with LLJTran MediaUtil API and implement the crop and 90 degrees rotation .

Please be aware that AndroidMediaUtil is probably harder to use, and might even need some modifications. Feel free to modify your schedule to allow some buffer, for instance I would suggest not doing contrast change and EXIF, and leaving more time for both unit tests and final code review.

Please be aware that AndroidMediaUtil is probably harder to use, and might even need some modifications. Feel free to modify your schedule to allow some buffer, for instance I would suggest not doing contrast change and EXIF, and leaving more time for both unit tests and final code review.

so blur/rotate/crop only these 3 features are sufficient for now ??

Yes, if done losslessly then blur+rotate+crop is well enough for a GSoC.
You can keep "Implement Update Depicts" as a bonus task "if time allows".

Yes, if done losslessly then blur+rotate+crop is well enough for a GSoC.
You can keep "Implement Update Depicts" as a bonus task "if time allows".

Schedule modified 🙂

Great Proposal,
Nice touch with MY LEARNING.

Just few minor things :

  1. Add links to the libraries you'll be using for reference in your proposal.
  2. You can add some time for documentation.
  3. It is suggested to maintain of log of your work. You can have it in form of biweekly blogs and dedicate some time in your proposal.
  4. Evolution -> Evaluation.

Great Proposal,
Nice touch with MY LEARNING.

Just few minor things :

  1. Add links to the libraries you'll be using for reference in your proposal.
  2. You can add some time for documentation.
  3. It is suggested to maintain of log of your work. You can have it in form of biweekly blogs and dedicate some time in your proposal.
  4. Evolution -> Evaluation.

Thanks for the feedback.
My proposal is totally inspired by the one you submitted last year.

changes:-

  1. Added the links to it.
  2. last two weeks are free for further testing and bug solving, so added documentation there.
  3. Sorry, but I didn't understand what are you telling here.
  4. Changed. 🙂

A question:- It is needed to submit the proposal in GSOC in PDF format so how can I download this proposal from phabricator ?

GSoC Guide
Last year's reports

They are not hard requirements for GSoC but it is a good idea to create biweekly reports that help keep track of your progress and also give some exposure.

You can have a print of this page but that would include the comments as well.
Better take a copy-paste of the content and format it to your need.

GSoC Guide
Last year's reports

They are not hard requirements for GSoC but it is a good idea to create biweekly reports that help keep track of your progress and also give some exposure.

You can have a print of this page but that would include the comments as well.
Better take a copy-paste of the content and format it to your need.

Got it now.

changes done.

Hi! I am Srishti, one of the org admins - it's great to see your interest in applying to GSoC with Wikimedia! You can safely ignore this message if you have already followed our participants' guide. As you develop your proposal, we want to ensure that you follow the application process steps: https://www.mediawiki.org/wiki/Google_Summer_of_Code/Participants#Application_process_steps, primarily communicate with project mentors, integrate their feedback in your proposal, adhere to the guidelines around proposal submission, contribute to microtasks, etc. Let us know if there are any questions!

As the GSoC deadline is soon approaching in less than 24 hours (April 19, 2022, 18:00 UTC), please ensure that the information in your proposal on Phabricator is complete and you have already submitted it on the Google's program website in the recommended format. When you have done so, please move your proposal here on the Phabricator workboard https://phabricator.wikimedia.org/project/board/5716/ from "Proposals in Progress" to the "Proposals Submitted' column by simply dragging it. Let us know if you have any questions.

Gopavasanth added a subscriber: Gopavasanth.

@Rishavgupta933 We are sorry to say that we could not allocate a slot for you this time. Please do not consider the rejection to be an assessment of your proposal. We received over 75 quality applications, and we could only accept 10 students. We were not able to give all applicants a slot that would have deserved one, and these were some very tough decisions to make. Please know that you are still a valued member of our community and we by no means want to exclude you. Many students who we did not accept in 2021 have become Wikimedia maintainers, contractors and even GSoC students and mentors this year!

Your ideas and contributions to our projects are still welcome! As a next step, you could consider finishing up any pending pull requests or inform us that someone has to take them over. Here is the recommended place for you to get started as a newcomer: https://www.mediawiki.org/wiki/New_Developers.

If you would still be eligible for GSoC next year, we look forward to your participation