C4Labs / C4iOS

C4 is an open-source creative coding framework that harnesses the power of native iOS programming with a simplified API that gets you working with media right away. Build artworks, design interfaces and explore new possibilities working with media and interaction.
www.c4ios.com
MIT License
981 stars 75 forks source link

Updates initialization of Image(frame:) and fixes bug in Generate #675

Closed traviskirton closed 8 years ago

traviskirton commented 8 years ago

@aleph7 I finally remembered why I had set the contents in the first place...

When creating an image from a filter like this the coordinates of the CIImage are {0, -h, w, h}, so setting a UIImage like this:

self.imageView.image = UIImage(CIImage: output)

Results in the image not showing up... i.e. since the original image data is placed -h the contents of the new UIImage are empty.

alejandro-isaza commented 8 years ago

This still looks weird to me. Let's follow this SO answer: http://stackoverflow.com/questions/9094058/creating-uiimage-from-ciimage#9615090

traviskirton commented 8 years ago

@aleph7: amended this commit, not sure if that showed up for you