dmitric / DLCImagePickerController

ImagePickerController with live filters, radial blur and more. Brought to you by Backspaces.

Home Page:www.backspac.es

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having difficulties with using images

MattW86 opened this issue · comments

Hello,

I am having difficulties to use images within the DLCImagePickerController. For example I am trying to add an image to filtersBackgroundImageView. There is no image showing. Can you please help me? Thanks..

    GPUImageOutput<GPUImageInput> *processUpTo;

    if (hasBlur) {
        processUpTo = blurFilter;
    } else {
        processUpTo = filter;
    }

    [staticPicture processImage];

    UIImage *currentFilteredVideoFrame = [processUpTo imageFromCurrentlyProcessedOutputWithOrientation:staticPictureOriginalOrientation];


    UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(3, 3, 10, 10)];
    iv.image = [UIImage imageWithData:UIImageJPEGRepresentation(currentFilteredVideoFrame, self.outputJPEGQuality)];
    [self.filtersBackgroundImageView addSubview:iv];


    NSDictionary *info = [[NSDictionary alloc] initWithObjectsAndKeys:
                          UIImageJPEGRepresentation(currentFilteredVideoFrame, self.outputJPEGQuality), @"data", nil];
    [self.delegate imagePickerController:self didFinishPickingMediaWithInfo:info];