本文整理汇总了Java中jp.co.cyberagent.android.gpuimage.GPUImageDarkenBlendFilter类的典型用法代码示例。如果您正苦于以下问题:Java GPUImageDarkenBlendFilter类的具体用法?Java GPUImageDarkenBlendFilter怎么用?Java GPUImageDarkenBlendFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GPUImageDarkenBlendFilter类属于jp.co.cyberagent.android.gpuimage包,在下文中一共展示了GPUImageDarkenBlendFilter类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createRenderEntities
import jp.co.cyberagent.android.gpuimage.GPUImageDarkenBlendFilter; //导入依赖的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;
}