GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

UIImage corruption when using ColorBurnBlending and Closing filters

Open valvoline opened this issue 14 years ago • 2 comments

Hi all,

I just managed a full working FilterGroup that, basically, made the following step:

  • ClosingFilter
  • SobelFilter
  • ColorBurnBlending of the previous

attached there's a snip of code from the GPUImageFilterGroup subclass:

- (id)init {
    if (!(self = [super init]))
    {
        return nil;
    }

    closingFilter = [[GPUImageRGBClosingFilter alloc] initWithRadius:4];
    [self addFilter:closingFilter];

   sketchFilter = [[GPUImageSketchFilter alloc] init];
   [self addFilter:sketchFilter];

   blendFilter = [[GPUImageColorBurnBlendFilter alloc] init];
    [self addFilter:blendFilter];

    [closingFilter addTarget:blendFilter];
    [sketchFilter addTarget:blendFilter];

    self.initialFilters = [NSArray arrayWithObjects:sketchFilter, closingFilter, nil];
    self.terminalFilter = cropFilter;
    return self;
}

However, the resulting image shows little glitches and image corruption in the leftmost part of the image, as you can see here:

glitches Format: glitches

valvoline avatar Jun 11 '12 09:06 valvoline

Are you trying to take a photo using something other than the Photo preset? There's a known bug in AV Foundation where photos captured using -captureStillImageAsynchronouslyFromConnection: have white bars on the left side for any preset other than full photos. I've worked around this for photos from the front-facing camera, but if you use the rear camera and anything other than the photo preset, you'll see this.

BradLarson avatar Jun 11 '12 14:06 BradLarson

Hi Brad,

I'm using PhotoPreset. The problem is present only on iPhone4. 4S seems to be ok.

valvoline avatar Jun 19 '12 08:06 valvoline