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.68k stars 331 forks source link

Failed loading image texture #67

Open emresancaktar opened 4 years ago

emresancaktar commented 4 years ago

I call GPUImage method from another class(Filter.swift) with completion handler.

let toonFilter = ToonFilter()
      let filteredImage = image.filterWithOperation(toonFilter)
      completion(filteredImage)

and I use completion handler to put on imageView but sometimes with some images it crash with this error Failed loading image texture

kxvn-lx commented 4 years ago

Having the same issue too. Any fix?

LipYoung commented 3 years ago
      let resultlookupFilter = LookupFilter()
      resultlookupFilter.lookupImage = PictureInput(image: lutImage)
      resultlookupFilter.intensity = filterModel.userSetIntensity
      let resultImg = self.originalImage.filterWithOperation(resultlookupFilter)

it will be crash.

LipYoung commented 3 years ago

Maybe I should use GPUImage1.

mauroat22 commented 3 years ago

In my case, the problem was specifically when applying the filters in some large PNG images. One workaround could be convert them to Jpeg, or resize it to smaller sizes if you wanna keep using PNG.