ios - Objective-C How does snapchat make the text on top of an image/video so sharp and not pixelated? -


in app, allows users place text on top of images snapchat, allowed save image device. add text view on top of image , take picture of image using code:

uigraphicsbeginimagecontext(imageview.layer.bounds.size); [imageview.layer renderincontext:uigraphicsgetcurrentcontext()]; uiimage* savedimage = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); 

but when compare text on image, text snapchat image...it different. snapchat's word text on top of image sharper mine. mine looks pixelated. not compressing image @ all, saving image using alassetlibrary.

thank you

when use uigraphicsbeginimagecontext, defaults 1x scale (i.e. non-retina resolution). want:

uigraphicsbeginimagecontextwithoptions(imageview.layer.bounds.size, yes, 0); 

which use same scale screen (probably 2x). final parameter scale of resulting image; 0 means "whatever screen is".


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -