本文整理汇总了Java中jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter类的典型用法代码示例。如果您正苦于以下问题:Java GPUImagePixelationFilter类的具体用法?Java GPUImagePixelationFilter怎么用?Java GPUImagePixelationFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GPUImagePixelationFilter类属于jp.co.cyberagent.android.gpuimage包,在下文中一共展示了GPUImagePixelationFilter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FilterAdjuster
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public FilterAdjuster(final GPUImageFilter filter) {
if (filter instanceof GPUImageSharpenFilter) {
adjuster = new SharpnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSepiaFilter) {
adjuster = new SepiaAdjuster().filter(filter);
} else if (filter instanceof GPUImageContrastFilter) {
adjuster = new ContrastAdjuster().filter(filter);
} else if (filter instanceof GPUImageGammaFilter) {
adjuster = new GammaAdjuster().filter(filter);
} else if (filter instanceof GPUImageBrightnessFilter) {
adjuster = new BrightnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSobelEdgeDetection) {
adjuster = new SobelAdjuster().filter(filter);
} else if (filter instanceof GPUImageEmbossFilter) {
adjuster = new EmbossAdjuster().filter(filter);
} else if (filter instanceof GPUImage3x3TextureSamplingFilter) {
adjuster = new GPU3x3TextureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHueFilter) {
adjuster = new HueAdjuster().filter(filter);
} else if (filter instanceof GPUImagePosterizeFilter) {
adjuster = new PosterizeAdjuster().filter(filter);
} else if (filter instanceof GPUImagePixelationFilter) {
adjuster = new PixelationAdjuster().filter(filter);
} else if (filter instanceof GPUImageSaturationFilter) {
adjuster = new SaturationAdjuster().filter(filter);
} else if (filter instanceof GPUImageExposureFilter) {
adjuster = new ExposureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHighlightShadowFilter) {
adjuster = new HighlightShadowAdjuster().filter(filter);
} else if (filter instanceof GPUImageMonochromeFilter) {
adjuster = new MonochromeAdjuster().filter(filter);
} else if (filter instanceof GPUImageOpacityFilter) {
adjuster = new OpacityAdjuster().filter(filter);
} else if (filter instanceof GPUImageRGBFilter) {
adjuster = new RGBAdjuster().filter(filter);
} else if (filter instanceof GPUImageWhiteBalanceFilter) {
adjuster = new WhiteBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageVignetteFilter) {
adjuster = new VignetteAdjuster().filter(filter);
} else if (filter instanceof GPUImageDissolveBlendFilter) {
adjuster = new DissolveBlendAdjuster().filter(filter);
} else if (filter instanceof GPUImageGaussianBlurFilter) {
adjuster = new GaussianBlurAdjuster().filter(filter);
} else if (filter instanceof GPUImageCrosshatchFilter) {
adjuster = new CrosshatchBlurAdjuster().filter(filter);
} else if (filter instanceof GPUImageBulgeDistortionFilter) {
adjuster = new BulgeDistortionAdjuster().filter(filter);
} else if (filter instanceof GPUImageGlassSphereFilter) {
adjuster = new GlassSphereAdjuster().filter(filter);
} else if (filter instanceof GPUImageHazeFilter) {
adjuster = new HazeAdjuster().filter(filter);
} else if (filter instanceof GPUImageSphereRefractionFilter) {
adjuster = new SphereRefractionAdjuster().filter(filter);
} else if (filter instanceof GPUImageSwirlFilter) {
adjuster = new SwirlAdjuster().filter(filter);
} else if (filter instanceof GPUImageColorBalanceFilter) {
adjuster = new ColorBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageLevelsFilter) {
adjuster = new LevelsMinMidAdjuster().filter(filter);
} else if (filter instanceof GPUImageBilateralFilter) {
adjuster = new BilateralAdjuster().filter(filter);
} else if (filter instanceof GPUImageTransformFilter) {
adjuster = new RotateAdjuster().filter(filter);
}
else {
adjuster = null;
}
}
示例2: PixelationFilterPostprocessor
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public PixelationFilterPostprocessor(Context context, float pixel) {
super(context, new GPUImagePixelationFilter());
this.pixel = pixel;
GPUImagePixelationFilter filter = getFilter();
filter.setPixel(pixel);
}
示例3: PixelationFilterTransformation
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public PixelationFilterTransformation(Context context, BitmapPool pool, float pixel) {
super(context, pool, new GPUImagePixelationFilter());
mPixel = pixel;
GPUImagePixelationFilter filter = getFilter();
filter.setPixel(mPixel);
}
示例4: PixelationFilterTransformation
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public PixelationFilterTransformation(Context context, float pixel) {
super(context, new GPUImagePixelationFilter());
mPixel = pixel;
GPUImagePixelationFilter filter = getFilter();
filter.setPixel(mPixel);
}
示例5: createRenderEntities
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
@NonNull
private List<CaseEntity> createRenderEntities() {
List<CaseEntity> renderEntityList = new ArrayList<>(100);
BasicTextureFilter basicTextureFilter = new BasicTextureFilter();
renderEntityList.add(new CaseEntity(basicTextureFilter, new GPUImageFilter(), firstBitmap));
ContrastFilter contrastFilter = new ContrastFilter(3.0f);
GPUImageContrastFilter gpuImageContrastFilter = new GPUImageContrastFilter(3.0f);
renderEntityList.add(new CaseEntity(contrastFilter, gpuImageContrastFilter, firstBitmap));
SaturationFilter saturationFilter = new SaturationFilter(0.5f);
GPUImageSaturationFilter gpuImageSaturationFilter = new GPUImageSaturationFilter(0.5f);
renderEntityList.add(new CaseEntity(saturationFilter, gpuImageSaturationFilter, firstBitmap));
List<TextureFilter> filters = new ArrayList<>();
filters.add(new ContrastFilter(3.0f));
filters.add(new SaturationFilter(0.5f));
FilterGroup filterGroup = new FilterGroup(filters);
GPUImageFilterGroup gpuImageFilterGroup = new GPUImageFilterGroup();
gpuImageFilterGroup.addFilter(new GPUImageContrastFilter(3.0f));
gpuImageFilterGroup.addFilter(new GPUImageSaturationFilter(0.5f));
renderEntityList.add(new CaseEntity(filterGroup, gpuImageFilterGroup, firstBitmap));
HueFilter hueFilter = new HueFilter(190);
GPUImageHueFilter gpuImageHueFilter = new GPUImageHueFilter(190);
renderEntityList.add(new CaseEntity(hueFilter, gpuImageHueFilter, firstBitmap));
PixelationFilter pixelationFilter = new PixelationFilter(36);
GPUImagePixelationFilter gpuImagePixelationFilter = new GPUImagePixelationFilter();
gpuImagePixelationFilter.setPixel(36);
renderEntityList.add(new CaseEntity(pixelationFilter, gpuImagePixelationFilter, firstBitmap));
LightenBlendFilter lightenBlendFilter = new LightenBlendFilter(secondBitmap);
GPUImageLightenBlendFilter gpuImageLightenBlendFilter = new GPUImageLightenBlendFilter();
gpuImageLightenBlendFilter.setBitmap(secondBitmap);
renderEntityList.add(new CaseEntity(lightenBlendFilter, gpuImageLightenBlendFilter, firstBitmap));
DarkenBlendFilter darkenBlendFilter = new DarkenBlendFilter(secondBitmap);
GPUImageDarkenBlendFilter gpuImageDarkenBlendFilter = new GPUImageDarkenBlendFilter();
gpuImageDarkenBlendFilter.setBitmap(secondBitmap);
renderEntityList.add(new CaseEntity(darkenBlendFilter, gpuImageDarkenBlendFilter, firstBitmap));
GammaFilter gammaFilter = new GammaFilter(2.0f);
GPUImageGammaFilter gpuImageGammaFilter = new GPUImageGammaFilter(2.0f);
renderEntityList.add(new CaseEntity(gammaFilter, gpuImageGammaFilter, firstBitmap));
DirectionalSobelEdgeDetectionFilter directionalSobelEdgeDetectionFilter = new DirectionalSobelEdgeDetectionFilter(4.0f);
GPUImageDirectionalSobelEdgeDetectionFilter gpuImageDirectionalSobelEdgeDetectionFilter = new GPUImageDirectionalSobelEdgeDetectionFilter();
gpuImageDirectionalSobelEdgeDetectionFilter.setLineSize(4.0f);
renderEntityList.add(new CaseEntity(directionalSobelEdgeDetectionFilter, gpuImageDirectionalSobelEdgeDetectionFilter, firstBitmap));
RGBFilter rgbFilter = new RGBFilter(1.0f, 0.3f, 0.5f);
GPUImageRGBFilter gpuImageRGBFilter = new GPUImageRGBFilter(1.0f, 0.3f, 0.5f);
renderEntityList.add(new CaseEntity(rgbFilter, gpuImageRGBFilter, firstBitmap));
float[] matrix4 = {
1.0f, 0.0f, 0.0f, 0.3f,
0.0f, 1.0f, 0.0f, 0.4f,
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f
};
ColorMatrixFilter colorMatrixFilter = new ColorMatrixFilter(0.3f, matrix4);
GPUImageColorMatrixFilter gpuImageColorMatrixFilter = new GPUImageColorMatrixFilter(0.3f, matrix4);
renderEntityList.add(new CaseEntity(colorMatrixFilter, gpuImageColorMatrixFilter, firstBitmap));
return renderEntityList;
}
示例6: FilterAdjuster
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public FilterAdjuster(final GPUImageFilter filter) {
if (filter instanceof GPUImageSharpenFilter) {
adjuster = new SharpnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSepiaFilter) {
adjuster = new SepiaAdjuster().filter(filter);
} else if (filter instanceof GPUImageContrastFilter) {
adjuster = new ContrastAdjuster().filter(filter);
} else if (filter instanceof GPUImageGammaFilter) {
adjuster = new GammaAdjuster().filter(filter);
} else if (filter instanceof GPUImageBrightnessFilter) {
adjuster = new BrightnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSobelEdgeDetection) {
adjuster = new SobelAdjuster().filter(filter);
} else if (filter instanceof GPUImageEmbossFilter) {
adjuster = new EmbossAdjuster().filter(filter);
} else if (filter instanceof GPUImage3x3TextureSamplingFilter) {
adjuster = new GPU3x3TextureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHueFilter) {
adjuster = new HueAdjuster().filter(filter);
} else if (filter instanceof GPUImagePosterizeFilter) {
adjuster = new PosterizeAdjuster().filter(filter);
} else if (filter instanceof GPUImagePixelationFilter) {
adjuster = new PixelationAdjuster().filter(filter);
} else if (filter instanceof GPUImageSaturationFilter) {
adjuster = new SaturationAdjuster().filter(filter);
} else if (filter instanceof GPUImageExposureFilter) {
adjuster = new ExposureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHighlightShadowFilter) {
adjuster = new HighlightShadowAdjuster().filter(filter);
} else if (filter instanceof GPUImageMonochromeFilter) {
adjuster = new MonochromeAdjuster().filter(filter);
} else if (filter instanceof GPUImageOpacityFilter) {
adjuster = new OpacityAdjuster().filter(filter);
} else if (filter instanceof GPUImageRGBFilter) {
adjuster = new RGBAdjuster().filter(filter);
} else if (filter instanceof GPUImageWhiteBalanceFilter) {
adjuster = new WhiteBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageVignetteFilter) {
adjuster = new VignetteAdjuster().filter(filter);
} else if (filter instanceof GPUImageDissolveBlendFilter) {
adjuster = new DissolveBlendAdjuster().filter(filter);
} else if (filter instanceof GPUImageGaussianBlurFilter) {
adjuster = new GaussianBlurAdjuster().filter(filter);
} else if (filter instanceof GPUImageCrosshatchFilter) {
adjuster = new CrosshatchBlurAdjuster().filter(filter);
} else if (filter instanceof GPUImageBulgeDistortionFilter) {
adjuster = new BulgeDistortionAdjuster().filter(filter);
} else if (filter instanceof GPUImageGlassSphereFilter) {
adjuster = new GlassSphereAdjuster().filter(filter);
} else if (filter instanceof GPUImageHazeFilter) {
adjuster = new HazeAdjuster().filter(filter);
} else if (filter instanceof GPUImageSphereRefractionFilter) {
adjuster = new SphereRefractionAdjuster().filter(filter);
} else if (filter instanceof GPUImageSwirlFilter) {
adjuster = new SwirlAdjuster().filter(filter);
} else if (filter instanceof GPUImageColorBalanceFilter) {
adjuster = new ColorBalanceAdjuster().filter(filter);
} else {
adjuster = null;
}
}
示例7: FilterAdjuster
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public FilterAdjuster(final GPUImageFilter filter) {
if (filter instanceof GPUImageSharpenFilter) {
adjuster = new SharpnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSepiaFilter) {
adjuster = new SepiaAdjuster().filter(filter);
} else if (filter instanceof GPUImageContrastFilter) {
adjuster = new ContrastAdjuster().filter(filter);
} else if (filter instanceof GPUImageGammaFilter) {
adjuster = new GammaAdjuster().filter(filter);
} else if (filter instanceof GPUImageBrightnessFilter) {
adjuster = new BrightnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSobelEdgeDetection) {
adjuster = new SobelAdjuster().filter(filter);
} else if (filter instanceof GPUImageEmbossFilter) {
adjuster = new EmbossAdjuster().filter(filter);
} else if (filter instanceof GPUImage3x3TextureSamplingFilter) {
adjuster = new GPU3x3TextureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHueFilter) {
adjuster = new HueAdjuster().filter(filter);
} else if (filter instanceof GPUImagePosterizeFilter) {
adjuster = new PosterizeAdjuster().filter(filter);
} else if (filter instanceof GPUImagePixelationFilter) {
adjuster = new PixelationAdjuster().filter(filter);
} else if (filter instanceof GPUImageSaturationFilter) {
adjuster = new SaturationAdjuster().filter(filter);
} else if (filter instanceof GPUImageExposureFilter) {
adjuster = new ExposureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHighlightShadowFilter) {
adjuster = new HighlightShadowAdjuster().filter(filter);
} else if (filter instanceof GPUImageMonochromeFilter) {
adjuster = new MonochromeAdjuster().filter(filter);
} else if (filter instanceof GPUImageOpacityFilter) {
adjuster = new OpacityAdjuster().filter(filter);
} else if (filter instanceof GPUImageRGBFilter) {
adjuster = new RGBAdjuster().filter(filter);
} else if (filter instanceof GPUImageWhiteBalanceFilter) {
adjuster = new WhiteBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageVignetteFilter) {
adjuster = new VignetteAdjuster().filter(filter);
} else if (filter instanceof GPUImageDissolveBlendFilter) {
adjuster = new DissolveBlendAdjuster().filter(filter);
} else if (filter instanceof GPUImageGaussianBlurFilter) {
adjuster = new GaussianBlurAdjuster().filter(filter);
} else if (filter instanceof GPUImageCrosshatchFilter) {
adjuster = new CrosshatchBlurAdjuster().filter(filter);
} else if (filter instanceof GPUImageBulgeDistortionFilter) {
adjuster = new BulgeDistortionAdjuster().filter(filter);
} else if (filter instanceof GPUImageGlassSphereFilter) {
adjuster = new GlassSphereAdjuster().filter(filter);
} else if (filter instanceof GPUImageHazeFilter) {
adjuster = new HazeAdjuster().filter(filter);
} else if (filter instanceof GPUImageSphereRefractionFilter) {
adjuster = new SphereRefractionAdjuster().filter(filter);
} else if (filter instanceof GPUImageSwirlFilter) {
adjuster = new SwirlAdjuster().filter(filter);
} else if (filter instanceof GPUImageColorBalanceFilter) {
adjuster = new ColorBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageLevelsFilter) {
adjuster = new LevelsMinMidAdjuster().filter(filter);
} else {
adjuster = null;
}
}
示例8: PixelationFilterTransformation
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public PixelationFilterTransformation(float pixel) {
super(new GPUImagePixelationFilter());
this.pixel = pixel;
GPUImagePixelationFilter filter = getFilter();
filter.setPixel(this.pixel);
}
示例9: FilterAdjuster
import jp.co.cyberagent.android.gpuimage.GPUImagePixelationFilter; //导入依赖的package包/类
public FilterAdjuster(final GPUImageFilter filter) {
if (filter instanceof GPUImageSharpenFilter) {
adjuster = new SharpnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSepiaFilter) {
adjuster = new SepiaAdjuster().filter(filter);
} else if (filter instanceof GPUImageContrastFilter) {
adjuster = new ContrastAdjuster().filter(filter);
} else if (filter instanceof GPUImageGammaFilter) {
adjuster = new GammaAdjuster().filter(filter);
} else if (filter instanceof GPUImageBrightnessFilter) {
adjuster = new BrightnessAdjuster().filter(filter);
} else if (filter instanceof GPUImageSobelEdgeDetection) {
adjuster = new SobelAdjuster().filter(filter);
} else if (filter instanceof GPUImage3x3TextureSamplingFilter) {
adjuster = new GPU3x3TextureAdjuster().filter(filter);
} else if (filter instanceof GPUImageEmbossFilter) {
adjuster = new EmbossAdjuster().filter(filter);
} else if (filter instanceof GPUImageHueFilter) {
adjuster = new HueAdjuster().filter(filter);
} else if (filter instanceof GPUImagePosterizeFilter) {
adjuster = new PosterizeAdjuster().filter(filter);
} else if (filter instanceof GPUImagePixelationFilter) {
adjuster = new PixelationAdjuster().filter(filter);
} else if (filter instanceof GPUImageSaturationFilter) {
adjuster = new SaturationAdjuster().filter(filter);
} else if (filter instanceof GPUImageExposureFilter) {
adjuster = new ExposureAdjuster().filter(filter);
} else if (filter instanceof GPUImageHighlightShadowFilter) {
adjuster = new HighlightShadowAdjuster().filter(filter);
} else if (filter instanceof GPUImageMonochromeFilter) {
adjuster = new MonochromeAdjuster().filter(filter);
} else if (filter instanceof GPUImageOpacityFilter) {
adjuster = new OpacityAdjuster().filter(filter);
} else if (filter instanceof GPUImageRGBFilter) {
adjuster = new RedAdjuster().filter(filter);
} else if (filter instanceof GPUImageWhiteBalanceFilter) {
adjuster = new WhiteBalanceAdjuster().filter(filter);
} else if (filter instanceof GPUImageVignetteFilter) {
adjuster = new VignetteAdjuster().filter(filter);
} else if (filter instanceof GPUImageDissolveBlendFilter) {
adjuster = new DissolveBlendAdjuster().filter(filter);
} else {
adjuster = null;
}
}