= 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 Ucrop library. It's a well-maintained 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 use BufferedImage class in java to rotate an image.
**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**|**Start Date**|**End Date**|**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 149, 2022**|**Create UI of EditActivity .**|
|(SubTask)|713-June-2022|104-June-2022|Disscuss and Complete the EditActivity UI|
|(SubTask)|105-June-2022|126-June-2022|Add two tabs in EditActivity for crop and blur.|
|(SubTask)|137-June-2022|138-June-2022|Link the EditActivity with UploadActivity via a button.|
|(SubTask)|148-June-2022|149-June-2022|Test the implementation till now.|
|**Week 2**|**June 1520, 2022**|**June 219, 2022**|**Implement Crop Feature.**|Unavailable due to exams**|
|(SubTask)|15-|**Week 3**|**June- 30, 2022|19-June-**|**July 6, 2022|Implementation of crop feature|**|**Unavailable due to exams**|
|(SubTask)|20-June-|**Week 4**|**July 7, 2022|21-June-**|**July 13, 2022|Test c**|**Implement Crop fFeature and bug fix.|.**|
|**Week 3**|**June 22, |(SubTask)|7-July-2022**|**June 28, |9-July-2022**|**|Implement Blur Ftation of crop feature.**||
|(SubTask)|22-June10-July-2022|26-June11-July-2022|Implementation of blurWrite Test for this feature|
|(SubTask)|27-June12-July-2022|28-June13-July-2022|Test blur effectcrop feature and bug fix.|
|**Week 4**|**June 29, 20225**|**July 514, 2022**|**Adding created newly edited image in API callJuly 20, Finishing of Edit f2022**|**Implement Blur Feature.**|
|(SubTask)|29-June-2022|2-July-2022|Creating new images, replace them into uploadedfiles, display them and post API call, Finish implementation of the whole Edit14-July-2022|17-July-2022|Implementation of blur feature|
|(SubTask)|318-July-2022|420-July-2022|Write Test for this feature|Test blur effect and bug fix.|
|(SubTask)|4-|**Week 6**|**July- 21, 2022|5-**|**July-2022|Test the overall edit feature and bug fix| 27, 2022**|**UI of Updates**|
|**Week 5**|**July 6, 2022**|**July 11, 2022**|**Fixing Issue Number: [4312](https://github.com/commons-app/apps-android-commons/pull/4312) and [4320](https://github.com/commons-app/apps-android-commons/pull/4320) .**(SubTask)|21-July-2022|22-July-2022|First Evaluation|
|(SubTask)|623-July-2022|725-July-2022|Direct GPS on iscuss and Complementation|te UI of all edit screens|
|(SubTask)|726-July-2022|927-July-2022|Add back button, fetch username, and add share feature|Test of the implementation and bug fix|
|(SubTask)|10-|**Week 7**|**July- 28, 2022|11-July-**|**August 3, 2022|Test i**|**Implementation and bug fix|t extra features like contrast change.**|
|**Week 6**|**|(SubTask)|28-July 12, -2022**|**July 19, |1-August-2022**|**UI|Implementation of Updates**|contrast feature|
|(SubTask)|12-July2-August-2022|16-July3-August-2022|First Evaluation|Test contrast feature and bug fix.|
|(SubTask)|12-July-|**Week 8**|**August 4, 2022|16-July-**|**August 11, 2022|Discuss and Complete UI of all edit screens|**|**Implement extra features like EXIF change.**|
|(SubTask)|17-July4-August-2022|19-July9-August-2022|Test of the iImplementation and bug fix|of Hide EXIF feature|
|**Week 7**|**July 20, 2022**|**July 26, 2022**|**I|(SubTask)|10-August-2022|11-August-2022|Test of the implement Update Depicts.**|ation and bug fix|
|(SubTask)|20-July-2022|24-July-2022|Implement classes and Adapters for depicts and make the API call with existing post functions**Week 9**|**August 12, 2022**|**August 19, 2022**|**Implement Update Depicts**|
|(SubTask)|24-July12-August-2022|26-July16-August-2022|Linking the UI with updateImplement classes and Adapters for depicts and display changes|make the API call with existing post functions|
|**Week 8**|**July 27, |(SubTask)|17-August-2022**|**|19-August 2, 2022**|**Tests D-2022|Linking the UI with update depicts and other updates**|display changes|
|(SubTask)|27-July-|**Week 10**|**August 20, 2022|29-July-2022|Write **|**August 27, 2022**|**Tests for Depicts Uand other update|s**|
|(SubTask)|30-July20-August-2022|31-July21-August-2022|Write Tests for Depicts and bug fix|Update|
|(SubTask)|122-August-2022|24-August-2022|Started work on other updates UI|Tests for Depicts and bug fix|
|**Week 9**|**|(SubTask)|25-August 3, -2022**|**|27-August 9, -2022**|**Finish All Update Feature**||Started work on other updates UI|
|(SubTask)|3-|**Week 11**|**August-2022|6-August- 28, 2022|Take the new string from user for title/description**|**September 4, coordinates and replace old data with new one and u2022**|**Finish All Update by doing the API calls with existing post functions|Feature**|
|(SubTask)|7-August-2022|8-August-2022|Write tests using JUnit28-August-2022|31-August-2022|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)|8-August1-September-2022|9-August2-September-2022|Tests for this implementation and bug fix|Write tests using JUnit|
|**Week 10 Final**|**August 10, |(SubTask)|2-September-2022**|**August 16, |4-September-2022**|**Finish all over tasks|Tests for this implementation and bug fixes**||
|(SubTask)|10-August-|**Week 12 Final**|**September 5, 2022|13-August-**|**September 12, 2022|Overall Tests|**|**Finish all over tasks and bug fixes**|
|(SubTask)|14-August5-September-2022|16-August7-September-2022|Remaining Bug fix and suggestions|Overall Tests|
|(SubTask)|16-August9-September-2022|10-September-2022|Remaining Bug fix and suggestions|
|(SubTask)|11-September-2022|23-August12-September-2022|Final Evaluation|
==**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 ?** No** Yes, I will have my 4th-semester exams in June, I don’t have any other plans during the period of GSoCso I might miss 10-12 days.
- **How many hours can you dedicate to this ?** I have no other commitments this summer. 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 ]]