= 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**: [[ https://www.linkedin.com/in/rishav-gupta-edutainer/ | Rishav Gupta ]]
**GitHub :** [[ https://github.com/Rishavgupta12345 | 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 :**
{F35029491}
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 :**
{F35029494}
Example of all the features which will be displayed to the user for editing the photo
**a) Crop feature :**
{F35029497}
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 :**
{F35029500}
I will useLLJTran MediaUtil API to rotate an image 90 degrees.
**c) Blur feature :**{F35034617}
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** :==
|||||
|--- |--- |--- |--- |
|**Timeframe**|**Period**|**Task**|
|**Community Bonding Period**|**May 20, 2022-June 12, 2022**|**Get to know mentors and community, Reading the documentation, Familiarize with app structure, Reading about Commons API.**|
|**Week 1**|**June 13, 2022-June 19, 2022**|**Create UI of EditActivity .**|
|(SubTask)||Disscuss and Complete the EditActivity UI|
|(SubTask)||Add twohree tabs in EditActivity for crop,blur and blurrotate.|
|(SubTask)||Link the EditActivity with UploadActivity via a button.|
|(SubTask)||Test the implementation till now.|
|**Week 2**|**June 20, 2022-June 29, 2022**|**Unavailable due to exams**|
|**Week 3**|**June 30, 2022-July 6, 2022**|**Unavailable due to exams**|
|**Week 4**|**July 7, 2022-July 13, 2022**|**Implement Crop Feature.**|
|(SubTask)||Implementation of crop feature|LLJTran MediaUtil API|
|(SubTask)||Write Test for this fImplementation of Crop Feature|.|
|(SubTask)|||**Week 5**|**July 14, 2022-July 20, 2022**|**Test crop feature and bug fix.**|
|**Week 5**|**July 14, 2022-July 20, 2022**|**I|(SubTask)||Test of the implement Blur Feature.**|ation|
|(SubTask)||Implementation of blur feature|
|(SubTask)||Test blur effect and bBug fix.|
|**Week 6 First Evolution**|**July 21, 2022-July 27, 2022**|**UI of Updates**|
|(SubTask)||First Evaluation|
|(SubTask)||Discuss and Complete UI of all edit screens|
|(SubTask)||Test of the implementation and bug fix|
|**Week 7**|**July 28, 2022-Aug 3, 2022**|**Implement Rotate fBlur Feature**|.**|
|(SubTask)||Implementation of Rotateblur feature|
|(SubTask)||Test rotate featureblur effect and bug fix.|
|**Week 8**|**Aug 4, 2022-Aug11, 2022**|**Implement extra features like contrast change.**|Rotate feature**|
|(SubTask)||Implementation of contrast feature|LLJTran MediaUtil API|
|(SubTask)||Test of the iImplementation and bug fix|of Rotate feature|
|**Week 9**|**Aug 12, 2022-Aug 19, 2022**|**Implement extraTest rotate features like EXIF change and bug fix.**|
|(SubTask)||ImplementationTest of Hide EXIF feature|the implementation|
|(SubTask)||Test of the implementation and bBug fix|
|**Week 10**|**Aug 20, 2022-Aug 27, 2022**|**Implement 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 11**|**Aug 28, 2022-Sept 4, 2022**|**Finish 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|
|**Week 12 Final Evolution**|**Sept 5, 2022-Sept 12, 2022**|**Finish all over tasks and bug fixes**|
|(SubTask)||Overall Tests|
|(SubTask)||Remaining Bug fix and suggestions|
|(SubTask)||Final Evaluation|
===== **Note** :- =====
This year GSOC allows the student to extend the 12 week program to 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 am Rishav Gupta, a sophomore at [[ https://gnit.ac.in/ | Gurunanak Institute of Technology ]], India pursuing Btech in Computer Science and Engineering (expected 2024). I am an active member of the BitByte Coding club of my college. When I entered college I developed my interest in Android development. And worked on different self-made and open source projects. This helped me gain a good knowledge about it.
I like to sing and listen to music. My hobby is photography and experimenting with photoshop. I read self-development books in my free time and solve Rubix cube for fun
==**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** :==
I am very passionate about photography and photoshop is my hobby. That's the prime reason I am contributing to WIKIMEDIA and chosen it to work in GSoC. Wikimedia is all about media and photos which I am all about. And thus the project to implement transforming and editing the photos within the app is the best match to my interest and mastery.
==**Why should I be selected for the project** : ==
- **Skill** :- I am passionate about Android development. I’ve worked on Android projects for a long time and have a good knowledge of its architecture. I am familiar with the latest Android technologies and am well versed in the Java/Kotlin programming language. I have knowledge of API and caching in Android. I’ve developed an application following professional MVVM architecture and am familiar with jetpack libraries. As a part of my course curriculum, I know Datastructures and Algorithms (DSA) and Databases and Management Systems (DBMS) . And a photoshop expert. Thus, I believe I have the perfect set of skills required for this project.
- **Knowledge**:- I've been contributing to the Commons Android project since Jan 2022. Fixed many issues, reported some, helped maintainers in review, and cleaned 50+ old issues to make the project repository cleaner.
==**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. I have also participated in open source contests like Hacktoberfest and IIT Kharagpur winter of code and successfully cleared them.
**Projects** :
- [[ https://github.com/Rishavgupta12345/minesweeper | Minesweeper ]] - developed a minesweeper Android game.
- [[ https://github.com/Rishavgupta12345/music-player | Music player ]] - An app to play the songs on your phone.
**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 LINK** | **TITLE** | **STATUS** | **MY LEARNING** |
| [[ https://github.com/commons-app/apps-android-commons/pull/4873 | #4873 ]] | Copyright warning for beta flavor | merged | adding popup feature was something I learnt new while solving this issue
| [[ https://github.com/commons-app/apps-android-commons/pull/4882 | #4882 ]] | Add link to user guide in About | merged | learned about adding hyperlink into the app
| [[ https://github.com/commons-app/apps-android-commons/pull/4863 | #4863 ]] | The empty screen while no images found in custom picture selector | merged | this issue made me struggle a lot but was simple and taught me never to give up
| [[ https://github.com/commons-app/apps-android-commons/pull/4884 | #4884 ]] | The empty screen while no images found in custom picture selector [bug] | merged | test failed from above pull request , entirely a new experience, I learned the importance of UnitTesting
| [[ https://github.com/commons-app/apps-android-commons/pull/4860 | #4860 ]] | could be success could be failure | merged | small mistake in a string can make a entire app Un-functional
| [[ https://github.com/commons-app/apps-android-commons/pull/4890 | #4890 ]] | [Bug]: UnknownFormatConversionException: Conversion = 'এ' | merged | again a small string mistake made the app unfunctional, solved easily
| [[ https://github.com/commons-app/apps-android-commons/pull/4789 | #4789 ]] | Fix warnings for ImageFileLoader.kt | merged | fixing warnings using the Android studio suggestion itself
| [[ https://github.com/commons-app/apps-android-commons/pull/4899 | #4899 ]] | Prod/beta flavor messages may be nonsense for users | merged | added quality information for users
| [[ https://github.com/commons-app/apps-android-commons/pull/4915 | #4915 ]] | Improve review feature documentation | merged | got some insights about showing popup dialog
| [[ https://github.com/commons-app/apps-android-commons/pull/4920 | #4920 ]] | Replace toasts with snackbars where appropriate | open | got to know about the working of snackbars
| [[ https://github.com/commons-app/apps-android-commons/pull/4766 | #4766 ]] | Make the app more accessible - content description | open | use of adding content discription
**ISSUES CREATED**
| **ISSUE LINK** | **TITLE** | **STATUS**
| [[ https://github.com/commons-app/apps-android-commons/issues/4887 | #4887 ]] | Clear the old issues in this repository | open
| [[ https://github.com/commons-app/apps-android-commons/issues/4894 | #4894 ]] | [Bug]: language Bengali has many string problems | open
**OTHER TASK**
This is something that is a completely different form of contribution one can do to an organization. While searching for issues to work on I found out that the current repository of WIKIMEDIA is filled up with obsolete and irrelevant issues. There were **550+ issues** when I first started working. So I decided to inform about those to the mentors of our organization so that they can review and close those issues. And I was successful to close about **45+ issues**.
- **Links** :-
[[ https://github.com/commons-app/apps-android-commons/issues/4498| #4498 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4709| #4709 ]] , [[https://github.com/commons-app/apps-android-commons/issues/4459|#4459 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4443| #4443 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4594|#4594 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3066|#3066 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3917|#3917 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3607|#3607 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2919|#2919 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2836|#2836 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4398|#4398 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4855|#4866 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4589|#4598 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4307|#4307 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4388|#4388 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4269|#4269 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4234|#4234 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4131|#4131 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3956|#3956 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3987|#3987 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3394|#3394 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2950|#2950 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2920|#2920 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2910|#2910 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3247|#3247 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3208|#3208 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2785|# 2785 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4676|#4676 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3871|# 3871 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4670|#4670 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3777|#3777 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3246|#3246 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2002|#2002 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2747|#2747 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/2891|#2891 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3123|#3123 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3204|#3204 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3431|#3431 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3663|#3663 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3866|#3866 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3907|#3907 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3951|#3951 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/3968|#3968 ]] , [[ https://github.com/commons-app/apps-android-commons/issues/4209|#4209 ]]