当前位置: 首页>>代码示例>>Java>>正文


Java GPUImageContrastFilter类代码示例

本文整理汇总了Java中jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter的典型用法代码示例。如果您正苦于以下问题:Java GPUImageContrastFilter类的具体用法?Java GPUImageContrastFilter怎么用?Java GPUImageContrastFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GPUImageContrastFilter类属于jp.co.cyberagent.android.gpuimage包,在下文中一共展示了GPUImageContrastFilter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的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;
    }
}
 
开发者ID:ChillingVan,项目名称:android-openGL-canvas,代码行数:70,代码来源:FilterAdjuster.java

示例2: ContrastFilterPostprocessor

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的package包/类
public ContrastFilterPostprocessor(Context context, float contrast) {
  super(context, new GPUImageContrastFilter());
  this.contrast = contrast;

  GPUImageContrastFilter filter = getFilter();
  filter.setContrast(contrast);
}
 
开发者ID:CarGuo,项目名称:FrescoUtils,代码行数:8,代码来源:ContrastFilterPostprocessor.java

示例3: ContrastFilterTransformation

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的package包/类
public ContrastFilterTransformation(Context context, BitmapPool pool, float contrast) {
  super(context, pool, new GPUImageContrastFilter());
  mContrast = contrast;
  GPUImageContrastFilter filter = getFilter();
  filter.setContrast(mContrast);
}
 
开发者ID:open-android,项目名称:Glide-transformations,代码行数:7,代码来源:ContrastFilterTransformation.java

示例4: ContrastFilterTransformation

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的package包/类
public ContrastFilterTransformation(Context context, float contrast) {
  super(context, new GPUImageContrastFilter());
  mContrast = contrast;
  GPUImageContrastFilter filter = getFilter();
  filter.setContrast(mContrast);
}
 
开发者ID:open-android,项目名称:Picasso-transformations,代码行数:7,代码来源:ContrastFilterTransformation.java

示例5: createRenderEntities

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的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;
}
 
开发者ID:ChillingVan,项目名称:android-openGL-canvas,代码行数:69,代码来源:FilterActivity.java

示例6: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的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;
    }
}
 
开发者ID:macyuan,项目名称:TAG,代码行数:62,代码来源:GPUImageFilterTools.java

示例7: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的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;
  }
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:64,代码来源:FilterTools.java

示例8: ContrastFilterTransformation

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的package包/类
public ContrastFilterTransformation(float contrast) {
  super(new GPUImageContrastFilter());
  this.contrast = contrast;
  GPUImageContrastFilter filter = getFilter();
  filter.setContrast(this.contrast);
}
 
开发者ID:wasabeef,项目名称:glide-transformations,代码行数:7,代码来源:ContrastFilterTransformation.java

示例9: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter; //导入依赖的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;
    }
}
 
开发者ID:k0shk0sh,项目名称:Filtra-StyleMe-,代码行数:46,代码来源:FilterAdjuster.java


注:本文中的jp.co.cyberagent.android.gpuimage.GPUImageContrastFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。