GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

How can add a picture frame

Open jadelmag opened this issue 14 years ago • 3 comments

I want can add picture frame sometimes. I did this http://pastie.org/4127904 but when i select two times a picture frame go black the input camera. For add a picture frame i use the effect that im using in this moment and the disolveBlend Filter customized with some changes in open gl http://pastie.org/4127916.

Is there an easy way to add a picture frame??

jadelmag avatar Jun 21 '12 18:06 jadelmag

I solved using two inputImageTexture and two textureCoordinate, and some space for one and the other space for second image.

The problem is that i want change the filter without change the picture frame

jadelmag avatar Jun 23 '12 10:06 jadelmag

I don't have anything built in for this, but you could either supply the image frame using a custom filter that creates the border or by using an input image that represents the filter, then use the GPUImageAlphaBlendFilter on the border and the filtered image. If the border is added as the second input, and has 0.0 for the alpha channel in the areas you want the non-border area to show within your border image, the border will be overlaid on whatever filtered input you use for the interior image.

BradLarson avatar Jun 25 '12 01:06 BradLarson

I have this... To make a border with a picture i use two filters. First i use this filter to make the border with the picture http://pastie.org/4147716 And the second filter depends... the second filter I select from a list. For example if I select pixelateFilter, filterAux = PixelateFilter and this is the method to select the border http://pastie.org/4147741

And this is the method that add the filters and the inputImage http://pastie.org/4147785

But when i build the project and test the app make a border with the filter that i selected and a black space in the middle and if i change gl_FragColor = texture2D(inputImageTexture, textureCoordinate); in if and else the picture is frozen.

I´m going crazy

jadelmag avatar Jun 25 '12 11:06 jadelmag