BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.88k stars 611 forks source link

FilterShowcase does not build in Xcode 10 for iOS #279

Open benlachman opened 6 years ago

benlachman commented 6 years ago

When building the iOS examples project it fails with the following error on three of the filters:

GPUImage2/examples/Mac/FilterShowcase/FilterShowcase/FilterOperations.swift:751:16: Cannot convert value of type '() -> Histogram' to expected argument type '() -> _'

The problem filters the produce this error look to be:

Note that it is pulling the FilterOperations.swift file from the Mac examples directory structure. I don't think this is a problem, but I thought I'd point it out.

zhuhuihuihui commented 6 years ago

same here, any comments?

YuStephen commented 6 years ago

Same problem, but it's solved by using Swift 4.2, maybe u need edit some little codes in Appdelegate. you can try @zhuhuihuihui @benlachman

AddIcechan commented 6 years ago

Same problem. I solved by convert to Swift 4.2 . but I found somewhere error in sliderUpdateCallback when the filter was Histogram / Posterize / KuwaharaFilter / BulgeDistortion . Finally I change some code in the FilterOperations.swift .

in the sliderUpdateCallback Closure, they use round(double) function. but the parameter is float . so it should be change to roundf(float).

just like the Posterize.

filter.colorLevels = round(sliderValue) => filter.colorLevels = roundf(sliderValue)