i have a big trouble.
So i'm using camera API to make some photo,after that i need to add some text+rect on image and save into phone memory (internal).
I found solution like this :
1) calling api camera
2) OnActivityResult calling methods, which i converting image to bitmap,adding some text + Rectangle via Paint/Canvas(on image) and after this manipulation,saving my finished image(drawn text+rectangle) via BitmapCompress.
The problem is that Compress function load full image size into RAM memory and if ill make a few photo's,app will crash with OutOfMemoryException. My was trying to make workaround like this(worst variant) :
1)using asynchrone Compress(await mechanism)
2)when Compress is done,calling Bitmap.Recycle()
But this solution doesnt helped me. Await Compress saving photo with delay 2-3 seconds and i need to save my photo immediately (like how it doing Camera Api's).
PS Sorry for my Perfect english skills.
PPS Also have bug with text appearance(always drawing vertically,but i need horizontally).
Aucun commentaire:
Enregistrer un commentaire