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


Java GPUImageSaturationFilter类代码示例

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


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

示例1: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter; //导入依赖的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: setSaturation

import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter; //导入依赖的package包/类
private void setSaturation(Builder builder) {
    Log.d(TAG, "Blend " + builder.shouldBlend);
    if (builder.saturation != 0.0f) {
        this.saturationFilter = new GPUImageSaturationFilter();

        saturationFilter.setSaturation(builder.saturation);

        filterList.add(saturationFilter);
    }
}
 
开发者ID:cuipengpeng,项目名称:p1-android,代码行数:11,代码来源:FilterBuilder.java

示例3: initFilter

import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter; //导入依赖的package包/类
@Override
protected GPUImageFilter initFilter(Context context) {
    List<GPUImageFilter> filterList = new ArrayList<GPUImageFilter>();

    GPUImageSoftLightBlendFilter blendFilter = new GPUImageSoftLightBlendFilter();
    blendFilter.setBitmap(BitmapFactory.decodeResource(
            context.getResources(), R.drawable.filter_retro_vignette));
    filterList.add(blendFilter);

    GPUImageToneCurveFilter toneCurve = new GPUImageToneCurveFilter();
    PointF[] redControlPoints = new PointF[] { new PointF(0.0f, 0.145f),
            new PointF(0.063f, 0.153f), new PointF(0.251f, 0.278f),
            new PointF(0.573f, 0.776f), new PointF(0.624f, 0.863f),
            new PointF(0.682f, 0.922f), new PointF(0.792f, 0.965f),
            new PointF(1.0f, 1.0f) };

    PointF[] greenControlPoints = new PointF[] { new PointF(0.0f, 0.0f),
            new PointF(0.255f, 0.196f), new PointF(0.447f, 0.576f),
            new PointF(0.686f, 0.875f), new PointF(1.0f, 1.0f) };

    PointF[] blueControlPoints = new PointF[] { new PointF(0.0f, 0.137f),
            new PointF(0.251f, 0.251f), new PointF(0.345f, 0.376f),
            new PointF(0.608f, 0.698f), new PointF(0.890f, 0.91f),
            new PointF(1.0f, 0.941f) };

    toneCurve.setRedControlPoints(redControlPoints);
    toneCurve.setGreenControlPoints(greenControlPoints);
    toneCurve.setBlueControlPoints(blueControlPoints);

    filterList.add(toneCurve);

    GPUImageSaturationFilter saturation = new GPUImageSaturationFilter();
    saturation.setSaturation(0.6f);
    filterList.add(saturation);

    return new GPUImageFilterGroup(filterList);
}
 
开发者ID:cuipengpeng,项目名称:p1-android,代码行数:38,代码来源:RetroFilter.java

示例4: createRenderEntities

import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter; //导入依赖的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

示例5: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter; //导入依赖的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

示例6: FilterAdjuster

import jp.co.cyberagent.android.gpuimage.GPUImageSaturationFilter; //导入依赖的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

示例7: FilterAdjuster

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