GPUImageAmatorkaFilter crash with images that are specific dimensions

Has anyone seen problems with image sizes when used GPUImage

GPUImageAmatorkaFilter

?

It seems to have something to do with multiples of 4 - when the width and height are not multiples of 4, it outputs the result.

For example, if I try to filter an image with 749 width and height it is buggy. If I scale it to 752 or 744 it works.

Strange, it is buggy at 748. Which is a multiple of 4, but an odd number (187).

The original workaround is to do some calculations to shrink the image, but this is a garbage solution, I would obviously prefer to filter any size.

Before

enter image description here

After

enter image description here

+3


source to share


1 answer


GPUImageAmatorkaFilter

use GPUImageLookupFilter

with lookup_amatorka.png

as search texture. This texture is organized as 8x8 64x64 pixels quads representing all possible RGB colors. I tested GPUImageAmatorkaFilter

with 749 * 749px image and it works (check your code is up to date first ). I believe you are using the wrong size search texture , it should be 512 * 512px .



0


source







All Articles