Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transparent GPUImageView?

Tags:

ios

gpuimage

I am using a GPUImageView inside my iOS application. I want that the GPUImageView have a transparent background. I tried setBackground:[UIColor clearColor] It does not work. Any workarounds?

Regards

like image 750
user559668 Avatar asked Dec 11 '12 06:12

user559668


2 Answers

I found you need to set both of these to get a transparent background. Neither works alone.

strengthPreviewImageView.backgroundColor = [UIColor clearColor];
[strengthPreviewImageView setBackgroundColorRed:0 green:0 blue:0 alpha:0];
like image 89
kev Avatar answered Nov 10 '22 00:11

kev


...Did you try the method from the GPUImageView header?

- (void)setBackgroundColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent alpha:(GLfloat)alphaComponent;
like image 3
borrrden Avatar answered Nov 09 '22 23:11

borrrden