i building small image sharing app add text on image , can save album in ios. implemented use screenshot of screen , crop , save gallery.and reduced quality. when search other apps in appstore not that. after editing , saving gallery still image in super quality. example instagram , other photo editing app.
i have searched everywhere in stackoverflow , other websites im getting same screenshot concept.
uigraphicsbeginimagecontextwithoptions(imageview.bounds.size,true,2.0) self.view.drawviewhierarchyinrect(self.view.bounds, afterscreenupdates: true) newimage = uigraphicsgetimagefromcurrentimagecontext() uigraphicsendimagecontext() how make quality?
using line of code scaling image losing quality.
uigraphicsbeginimagecontextwithoptions(imageview.bounds.size,true,2.0) try this:
uigraphicsbeginimagecontextwithoptions(imageview.bounds.size,true,1.0) this make sure image same scale, meaning not lose quality.
Comments
Post a Comment