GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Strange image deformation (but only with some photo)

Open monteduro opened this issue 12 years ago • 1 comments

I'm trying to implement some Camera filter in my app, using GPUImage. Everything works fine, but sometime, with some (a few, really) photo i get the following result:

http://oi60.tinypic.com/2q3osi1.jpg

I'm using GPUImageLookupFilter, here is the code:

    @property (nonatomic, retain) GPUImagePicture *stillImageSource;

    ----

    _stillImageSource = [[GPUImagePicture alloc] initWithImage:self.previewImage]; <- in viewDidLoad

    ----

    [_stillImageSource removeAllTargets];
    GPUImagePicture *lookUpSource = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:self.lookUpArray[sender.tag]]];
    GPUImageLookupFilter *lookUpFilter = [[GPUImageLookupFilter alloc] init];
    [_stillImageSource addTarget:lookUpFilter];
    [lookUpSource addTarget:lookUpFilter];
    [_stillImageSource processImage];
    [lookUpSource processImage];
    self.imageView.image = [lookUpFilter imageFromCurrentlyProcessedOutput];

Anyone has an idea? PS: sorry for my english.

monteduro avatar Feb 04 '14 01:02 monteduro

As you found out, this is related to images that aren't a factor of 8 in size. At least one of the issues with this is reported in issue #1334, so I'll close this as a duplicate of that until I get this patched.

BradLarson avatar Feb 04 '14 15:02 BradLarson