ios - Swipe Image And Have Filter Overlay Along Swipe -


for few days i've been diligently researching how swiping between images filters working. there post has exact same issue: swipe between filtered images

basically need swipe between filtered images happens in snapchat, filter progressively overlaid swipe occurs this: https://www.youtube.com/watch?v=j75d7khf6im

but answer did not give example code , efforts have been no avail.

i have tried following:

1) first tried creating 2 images. 2nd 1 image filtered , first original image. wanted apply alpha mask @ 100% image 2 , 0% image 1. user swipes reduce alpha mask on image 2 , increase image mask image 1. when try follow example code came across run issue. cgimage nil (because original image not created cgimage data , i'm not sure how cgimage data)

    cgrect rect = cgrectmake(0, 0, 500, 500);      cgimageref imageref = cgimagecreatewithimageinrect(_picture.image.cgimage, rect);     uiimage*result = [uiimage imagewithcgimage:imageref];     _picture.image = result; cgimagerelease(imageref);     //does not work, cgimage null 

2) going crop image, regardless of mask, every time do, size , scale not match try code.

if provide bit more solution answer given (referenced above) appreciative. having issue creating alpha mask without using uiimage (i want create rectangle serves area not draw on image), , unsure how cgimage data. if can or have advice how design code grateful!

thank you!


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -