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

Make GPUImage compatible with Catalyst #300

Open sabiland opened 5 years ago

sabiland commented 5 years ago

When macOS 10.15 will be released, I'll port some of my apps to macOS. Brad do you know maybe if iOS-GPUImage2 is compatible with this?

BradLarson commented 5 years ago

GPUImage2 works across Mac and iOS, so all you should need to do is switch the framework target being used from the iOS one to the Mac one. I'm adding Swift Package Manager support (should be operational now, but I need more testing on this), which should aid the process.

ggua5470 commented 5 years ago

How about Swift Package Manager support for GPUImage3 ^_^ ??

sabiland commented 5 years ago

Brad I meant this new macOS 10.15 (Xcode 11) feature:

Project Catalyst

What is Project Catalyst? We'll start off with perhaps the most exciting piece of news for Mac users (and even more exciting for developers). Apple will be making it easier for developers to port iOS apps to the Mac. This is good for developers as they won't need to spend time and money writing code for two different apps.

If maybe you know if porting to macOS via Xcode 11 (macOS checkbox) && GPUImage2 iOS would work? Apple said Xcode 11 will automatically check/decide which third-party libraries will work on macOS port.

BradLarson commented 5 years ago

@sabiland - I thought this would be compatible with Catalyst as-is, but looking into it a little more, now I'm not so sure. I'm going to build a Catalyst test case and make sure this works with it.

@ggua5470 - Yes, as soon as I get this working correctly across the three platforms here, I'll bring across pretty much the same Package Manager manifest to GPUImage 3 (without Linux support, of course).

sabiland commented 5 years ago

@BradLarson thx for info!

sabiland commented 5 years ago

I do not know if it is possible for now, but I tried to build my app also for macos Catalina (without modyfying project, just trying to build) and I get those GPUImage2 errors.

Errors

Has anyone maybe succeded to build also for macos Catalina?

EDIT: I have switched to GPUImage3.

tianye2856 commented 3 years ago

I do not know if it is possible for now, but I tried to build my app also for macos Catalina (without modyfying project, just trying to build) and I get those GPUImage2 errors.

Errors

Has anyone maybe succeded to build also for macos Catalina?

EDIT: I have switched to GPUImage3. @sabiland Have you tried GPUImage3 on Mac Catalyst? I have rewrite OpenGL shader to GPUImage3 metal shader, it works well on iOS, but the UIImage result on Mac Catalyst is totally empty. Could you please help me? Thanks in advance.

@objc public func testAdjustmentGroup() -> UIImage
    {
        let testImage = UIImage(named:"WID-small.jpg")!
        let brightnessFilter = BrightnessAdjustment()   
        let filteredImage = testImage.filterWithOperation(brightnessFilter)

        // image is blank, but is not nil
        return filteredImage
    }