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.75k stars 347 forks source link

Fatal error: Failed loading image texture at PictureInput.swift #117

Open MaorS opened 3 years ago

MaorS commented 3 years ago

Hello, I'm trying to set Adaptive Threshold filter operation on UIImage with {3490, 4320} dimensions. And I'm getting this crash: Fatal error: Failed loading image texture: file GPUImage/PictureInput.swift, line 60 It reproduces every time. The image :

I know It's pretty much an Edge case, but it's happening at a high rate.

Example usage of mine :

let operation = AdaptiveThreshold()
operation.blurRadiusInPixels = 20.0
image.filterWithOperation(operation)

Am I'm doing something wrong? Also, Why using fatalError and not returning a nil value or throwing an exception?

Thank you

Darwel commented 3 years ago

https://github.com/warrenm/GLTFKit/blob/master/Framework/GLTFMTL/Source/GLTFMTLTextureLoader.m This may help you.

Dec22gln commented 3 years ago

The format of some images is not supported。maybe。