android - Implement a Take Picture + Crop or use premade Intents? -


i'm in middle of android app takes picture, crops , stuff. hoping my own cropping system, problem comes when test in different places. pictures appear rotated in cases, , not correctly cropped in others (like had margin around (seeing space of original picture), or so).

more on that, i've considered using intents. release me picture taking madness, cropping, , add interesting "get gallery" option, haven't implemented yet. crop intent may not in every android (as comes vanilla camera app, , devices don't have it), external libraries should on way, too.

however, way using crop , picture taking "automatic", meaning single button took square picture (out of square view of camera), being cropped @ same time (and post processing too), without issuing user, , crop libraries i've seen don't work way (they open new activity).

now comes question: would better leave work intents (and/or external libraries) , rethink logic of app, or stick current code , edge-case modifications appear (rotate in devices , not in others, crop differently, etc)?

pd: know question might not development-tight others (some say: no lines of code > no so!), indeed related coding well, find no better place ask it.

facebook , instagram have succesfully done own libraries or third party code. having started work on own cropping library suggest take way, borderline cases, optimisations , workarounds there, no doubt in control. example, orientation problem talked can handled :

orientationcolumnindex = cursor.getcolumnindexorthrow(mediastore.images.media.orientation);       cursor.getint(orientationcolumnindex) if(orient == 90 || orient == 180 || orient == 270 ){   matrix matrix = new matrix();   matrix.postrotate(orient);   result = bitmap.createbitmap(result, 0, 0, 4*screenwidth/15, 4*screenwidth/15, matrix, true); } 

using default android intent cropping, suggested, isnt reliable app made wide potential user base.


Comments