osx - inputImage of CIFilter is always black -


i'm experimenting cifilters, , i've applied filter nsview via through contentfilters array. i'm trying access pixel data of ciimage inputimage, i'm finding rendered inputimage appears black (though when returned filter's output, nsview renders you'd expect.)

view.contentfilters = [ customfilter() ]  //  ...  class customfilter: cifilter {      //  ...      override var outputimage: ciimage? {         if let inputimage = self.inputimage {             let extent = inputimage.extent              let bitmap = nsbitmapimagerep(ciimage: inputimage)              print(bitmap.colorat(x: 0, y: 0)) // 0 0 0 1 every pixel         }          return nil     }  } 

how can gain access true pixel data of input image?


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

vue.js - Create hooks for automated testing -

Optimising Firebase database by automatically overwriting data -