BradLarson / GPUImage3

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

Failed to load PVR texture with PictureInput #73

Closed useobjc closed 4 years ago

useobjc commented 4 years ago

An error of Image decoding failed occurred when loading a PVR texture with PictureInput. https://github.com/BradLarson/GPUImage3/blob/master/framework/Source/PictureInput.swift#L53-L61

Here's the workaround: Load the PVR texture with an URL instead of CGImage.

open func newTexture(URL: URL, options: [MTKTextureLoader.Option : Any]? = nil) throws -> MTLTexture