Well this is going to be my final blog post. Through the ups and downs of this project I have had a blast working on it. It feels surreal that this semester has already come to an end. As of now everything for my project can be found under the files tab of this website.
One Month Later
The past month has been my busiest month I have had this semester. Due to that I have not been able to work on my project as much as I would have liked to. During this month I have been able to implement a pseudo working undo & redo, zoom, half of my new function.
Currently my new function consists of four parts (blank, upload, camera, stock). I have my blank and upload options working. I have also done a lot of code for the camera application. I am at the point where the camera activity is called and you are able to take a photo. However I am not able to get the actual size of the photo, instead I am only capturing the thumbnail which is about 100x160 pixels. Also after implementing my upload function I have run into an error with my undo & redo functions.
Over the past week I have been brainstorming different ways that I could implement different brushes into my application. As of right now I still have not found a solution.
While I was stuck on that problem I started to implement my undo and redo functions. I got them working almost 100%. They keep track of each stroke the user takes on the canvas (path, color, size, brush). However, when the user changes both the brush and color before making a stroke, when undoing then redoing that stroke it will use the previous saved stroke instead of the correct one.
This past week I have implemented many small features into my application. The features I implemented are the save function (from my DrawLine test), adjustable zoom using pinch gestures, the color extractor and a basic brush selector.
For the save function I used the same one as in my test application. It won't save due to the same reason I ran into before. However, since I know why it won't save I am going to leave it alone until I implement taking a photo and uploading photos. Since for all of these processes I need to prompt for permissions upon opening the app for the first time.
Adjustable zoom gave me a bit of a headache, but for the most part I got it working for whenever the user pinches the screen. But the error it has right now is that once you activate the brush/eraser/extractor, when you go to zoom it will also be implementing their touch gestures. One way I may fix this in the future is by creating a button that allows you to zoom, but I would rather have the user zoom whenever they want to without having to go into the menu.
The color extractor was really easy to get working since I used similar code in making my color palette when picking a color from the color wheel. All I had to do was implement that code within my canvas.
Lastly I started to work on my brush selector. My original plan was to use the built in Paint class that exists in Java. However, when I started to make my different brushes I found out how limited the Paint class actually is. Because of that right now I am only able to have two brushes (circle and square). I am currently brainstorming ways to get past this dilemma. Besides that though I was easily able to implement ways to change the brushes size and opacity.
Color Palette Done
This past week I tackled the color palette for my application in full force. I had the option to use an API color wheel but decided against it. Instead I created my own custom color wheel with all the functions that I wanted implemented.
I finally decided on using Android Studio over Visual Studio and UE4. I came to this decision mainly for two simple reasons I noticed when I was doing my tests in all three. First off I could not get Xamarin to work at all in Visual Studio. Secondly when using UE4 I was tempted to use a lot more of blueprints instead of C++ code.
So I started doing my project in Android Studio. I am currently getting a baseline for my application that I can continue to add to. I started off by getting a brush implemented with three different sizes that can be chosen between. Next I created a simple color palette consisting of twelve different colors. After I got the brush and colors working I got the eraser working. Then the final two things I got done are a working new canvas button and a working save button.
I ran into an interesting issue when creating the save function. Every time I tried to save the image it would hit my fail safe toasting "cannot save image". I looked through my code and couldn't find anything wrong, I then started looking online for other people who had similar issues. After awhile of looking to no prevail I was messing around in my emulator and went to my apps info/permissions and found that its ability to store data on the device was turned off by default. I turned that on and my save was working perfectly afterwards. I'm curious if there is a way to automatically turn that permission to true through code instead of inside the emulator?
The next functions I need to work on are the undo and redo buttons. Since I need to be able to undo all actions the user performs I believe it is a good idea to get these buttons working as soon as possible so that I can add all future operations to them.
Choosing a Framework
The first decision I have to make in creating this mobile photo editing app is what framework I will be building it in. I have narrowed it down to three choices. The first is UE4 in which I would be programming in a mix of C++ and blueprints. Second is Android Studio in which I would be programming in Java and XML. Lastly is Visual Studio in which I would be programming in C#. I like the idea of using UE4 since I would be able to make it cross platform (android/windows/IOS). However, if I do end up using Visual Studio I might look into using Xamarin which would also allow me to make the app cross platform. In order to decide which to use, I am working on making a simple program (draw a line with your finger) in all three of them and see which one I like working with the most.
Create a free web site with Weebly