gpuimage

How to Implement GPUImageMaskFilter using GPUImage

廉价感情. 提交于 2019-12-09 05:30:41
问题 I need to Cut from the Full Image using the mask and created the masked Image. + = I tried the following: UIImage *imgMask = [UIImage imageNamed:@"Mask.png"]; UIImage *imgBgImage = [UIImage imageNamed:@"Full.png"]; GPUImageMaskFilter *maskingFilter = [[GPUImageMaskFilter alloc] init]; GPUImagePicture * maskGpuImage = [[GPUImagePicture alloc] initWithImage:imgMask ]; GPUImagePicture *FullGpuImage = [[GPUImagePicture alloc] initWithImage:imgBgImage ]; [maskGpuImage addTarget:maskingFilter];

how to use GPUImage without scale in android

試著忘記壹切 提交于 2019-12-08 16:23:01
问题 how to use GPUImage library without resizing original image and I need to apply for a filter like as Pixelate or Blur to an entire GPUImageView. I thought to use GPUImage but I don't know how to do it. 回答1: You change GPUImage library GPUImageRendering class below code is /* * Copyright (C) 2012 CyberAgent * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:/

GPU Image Filter disables audio in iOS

社会主义新天地 提交于 2019-12-08 13:29:04
问题 I have implemented Video filers using GPUImage framework and all the filters are applied, but audio is disabled if we play video with filters. But if i play the same movie url in mpmovieplayer audio is playing along with video. Below is my code: movieFile = [[GPUImageMovie alloc] initWithURL:self.videoURL]; movieFile.runBenchmark = YES; movieFile.playAtActualSpeed = YES; [movieFile addTarget:filter]; [filter setInputRotation:kGPUImageRotateRight atIndex:0]; GPUImageView *view = [[GPUImageView

GPUImage memory warnings

百般思念 提交于 2019-12-08 11:28:15
问题 I am facing a strange problem while applying GPUImage Filters on image. I am trying to apply different filters on an image but after applying 10-15 filters it gives me memory warning and then crashes. Here is the code: sourcePicture = [[GPUImagePicture alloc] initWithImage:self.m_imageView.image smoothlyScaleOutput:YES]; GPUImageBrightnessFilter *bright=[[GPUImageBrightnessFilter alloc]init]; [bright setBrightness:0.4]; GPUImageFilter *sepiaFilter = bright; [sepiaFilter prepareForImageCapture

How do I modify a GPUImageGaussianSelectiveBlurFilter to operate over a rectangle instead of a circle?

為{幸葍}努か 提交于 2019-12-08 11:03:41
问题 I have used the GPUImage framework for a blur effect similar to that of the Instagram application, where I have made a view for getting a picture from the photo library and then I put an effect on it. One of the effects is a selective blur effect in which only a small part of the image is clear the rest is blurred. The GPUImageGaussianSelectiveBlurFilter chooses the circular part of the image to not be blurred. How can I alter this to make the sharp region be rectangular in shape instead? 回答1

How To Apply GPUImage filters efficiently?

删除回忆录丶 提交于 2019-12-08 06:03:41
问题 In my project, I apply colors to an image then after a second I am applying a Kuwahara filter to it, for watercolor effect, but the thing is it takes time to apply the filter and if I change the colors too much the app eventually crashes due to memory issues. Can anyone help me how to use the filter in the best manner. Thanks CODE @objc func fillColorButtonTapped(_ sender : UIButton){ self.processingModel.isImageMixedColor = false if let popoverController = self.mkColorPicker

GPUImageMovie not playing video file when initWithPlayerItem

送分小仙女□ 提交于 2019-12-08 03:24:04
问题 I am using GPUImageMovie with initWithPlayerItem and its not starting the movie file on startProcessing. It was working fine with initWithUrl but I need playback controls for the player as told in this thread. I am using the following code -(void)loadVideo { _playerItem = [[AVPlayerItem alloc]initWithURL:movieURL]; _player = [AVPlayer playerWithPlayerItem:_playerItem]; movieFile = [[GPUImageMovie alloc] initWithPlayerItem:_playerItem]; movieFile.runBenchmark = YES; movieFile.playAtActualSpeed

Color Specific Hue/Saturation from Photoshop to iOS

大城市里の小女人 提交于 2019-12-08 02:04:11
问题 I'm trying to use GPUImage and CIFilter to map this filter. Please note, I need help mapping the color (Reds) specific (note: NOT Master, just Reds) photoshop element to iOS. Does anyone know how to manipulate a CIFilter or GPUImage class to get the photoshop effect below in iOS? 回答1: You could use GPUImage with the lookup filter: GPUImageLookupFilter: Uses an RGB color lookup image to remap the colors in an image. First, use your favourite photo editing application to apply a filter to

GPUImageAlphaBlendFilter realtime processing from GPUImageStillCamera source

有些话、适合烂在心里 提交于 2019-12-08 02:02:47
问题 I am using the GPUImage library and I'm trying to blend two images in realtime, and display them on a GPUImageView . I am trying to alpha-blend plain camera input, with a filtered version of it. Here is what I'm trying to do: ----------------->----v --camera--| alpha blend ----> image view -----> color filter --^ I've found some posts about using the blend filters, but they don't seem to be methods for realtime processing. I've found https://github.com/BradLarson/GPUImage/issues/319, GPUImage

Apply GPUImage filter to a UIView

谁说我不能喝 提交于 2019-12-07 10:52:48
问题 I've a problem. I need to apply a filter like Pixelate or Blur to an entire UIView . Like the eBay iPad app. I thought to use GPUImage but I don't know how to do it. There is a way to apply a filter to a GPUImageView directly without pass a UIImage ? The primary problem is that making a screenshot of a large UIView on an iPad 3rd is to expensive (2 seconds for the UIWindow grab). So the perfect solution is to apply filter directly to the views, just like eBay app, but.. how? Thanks to all!