I am new to Android and trying to develop an app that allow user to draw, save them which later on is able to reopen to edit and save back into the storage.
I have got the solution of drawing and saving part. However I am stuck with no idea how I can enable user to reopen the file for edit.
Will be grateful if someone could shed some light and provide me with clues or example how can this be done.
Thanks.
It depends entirely on how you draw and save the image. If you are saving it in a bitmap (png or jpeg) load it again and do other drawing operations with Canvas. You can do the drawings using a SufaceView
Related
I have an image processing app, and I have to remember which photos have already been processed. In order to do so, I store an EXIF metadata in the image file, but if the user decides to send the image over WhatsApp, etc, the metadata is lost, so I can't rely on this.
So I though a solution would be to use some pixels in the image to remember if the photo was processed or not, something like if that pixel has that color and that other that other color, then it was processed.
I have tried to do so, but if the image gets scaled down, then my approach won't work.
Any ideas on how to do it?
Thank you.
This is a quite complicated topic and there's no silver bullet that'll help you. One pitfall is the fact that most image compression algorithms try to throw away data our eyes cannot see, and your watermarking algorithm would then have to make modifications that are visible to the human eye, which is probably not what you want.
Another thing to note is whatever you do, if you go with the route of storing data using pixels, you're going to have false positives.
What you could do, since your app already does image processing, is to embed your application's logo as a watermark into the image somewhere. Then you can attempt to find distinct features of your logo in the image, which is admittedly not very easy, but neither is the problem.
Again, this problem is already quite complicated so I'm sorry if this answer isn't adequate.
I am trying to develop an app that allow user to draw, save, edit the already drawn image, delete already drawn image, share drawn image, and show all of the users drawing at one place
I have got the solution of drawing and saving and sharing part. However I have no idea about how to show all of the drawn image at one place and let user select to delete or edit it.
plz someone help me in my learning. Thanx in advance for the help.
You just save all the images in your database in two ways to store Base64 String of image or just save the bytes array and use it to manage all functionality like delete save or anything.
My app has a Report screen that includes a bunch of small bitmap images. I want to be able to take those images, and put them all into a single image file (formatted properly so that they are not overlapping) for viewing, but I'm unsure of how to go about it. I'm trying to prevent having a separate file for each image if possible. Does anyone know how this could be achieved? I'm not looking for someone to do it for me, but just give me a nudge in the right direction.
I am building a simple photo sharing application. When I click camera icon, user would be able to take photo using the camera app. And when he saves that photo, it will be shown in grid view including the previously taken photos.
This means, when I take nth photo in an album , i should draw the bitmap for the other (n-1) bitmaps again. This would happen continuously. Even if i delete a pic, i should redraw (n-1) pictures using bitmaps again.
I am thinking of using some caching of created bitmaps and using it again.
Is there any caching recommendation for this scenario.
Thanking you in advance..
Regards,
Mugil
Here's a good place to cache icons: make a subclass of Application.
"Application" sticks around for the life of your application, regardless of which activities come and go. Even if you exit the app and do something else for a while, the app isn't necessarily terminated.
In your subclass, create your hash, array, or whatever to hold your icons.
I have 3 sets of 50 images and I have to create the animations for each set of images in Android application. I am able to create a simple application which animate first set of 50 images using the below method,
Added Animation-list xml in drawable folder and called it using frameAnimation.start().
This method didn't work until I kept the following "android:largeHeap="true" in manifest file.
I am not sure whether this is the good way to animate the images (if we have more number of images and each image of more size like 60 KB. Image is JPG format) or not
I browsed and I found that, if we are able to clear the memory and if we are able to maintain less number of images in memory, then our application will work very fine. So I want to know how to clear the memory?
Please let me know do I need to follow different method to animate the images other than I explained above, so that I can clear the memory.
Thanks for your help.
After looking into several posts and doing much research, I finally ended up modifying the images in Imageview programmatically to simulate frame animation. That way I am just maintaining three images in cache at any point of time (previous, current and next one). I hope that this will be useful to others.
It is not a good thing to process a large amount of images in a frame like manner in Android itself as it will trigger the dreaded "Out of Memory" exception.
Clearing the memory itself is not possible. The best fix for this is proper bitmap handling of the app.
I'm not sure but you might want to check on PhoneGap.
Its an HTML5 Engine that we used before to create a game.
By drawing into the canvas itself, we've recreated frame animation with it. It just requires WebDev skills though.