Filterpedia icon indicating copy to clipboard operation
Filterpedia copied to clipboard

Swift 3 conversion error

Open aleksanderkania opened this issue 9 years ago • 3 comments

Hello, I tried to convert HistogramDisplay to Swift 3 but I have a problem with this lines of code:

 let histogram = UnsafeMutablePointer<UnsafeMutablePointer<vImagePixelCount>>(mutating: rgba)       
 vImageHistogramCalculation_ARGB8888(&inBuffer, histogram, UInt32(kvImageNoFlags))

the vImageHistogramCalculation_ARGB8888 method is still same as in Swift 2.3 but I can't properly initialized an optional UnsafeMutablePointer<UnsafeMutablePointer<vImagePixelCount>> method. Some ideas? :)

I received the error:

: Cannot invoke initializer for type 'UnsafeMutablePointer<UnsafeMutablePointer<vImagePixelCount>?>' with an argument list of type '(mutating: [UnsafeMutablePointer<vImagePixelCount>])'

aleksanderkania avatar Nov 11 '16 15:11 aleksanderkania

Look on my fix here: https://github.com/genadyo/Filterpedia

genadyo avatar Nov 14 '16 06:11 genadyo

Very nice, thank you (:

aleksanderkania avatar Nov 15 '16 20:11 aleksanderkania

@aleksanderkania that does not work in the archive mode ...

philolo1 avatar Jan 09 '17 23:01 philolo1