本文整理汇总了Java中com.jhlabs.image.ChromeFilter类的典型用法代码示例。如果您正苦于以下问题:Java ChromeFilter类的具体用法?Java ChromeFilter怎么用?Java ChromeFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChromeFilter类属于com.jhlabs.image包,在下文中一共展示了ChromeFilter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import com.jhlabs.image.ChromeFilter; //导入依赖的package包/类
@Override
public BufferedImage run(final @NonNull BufferedImage image, final @NonNull AsciiCharacter character) {
final ChromeFilter filter = new ChromeFilter();
filter.setAmount(amount);
filter.setExposure(exposure);
// Get the character image and filter it:
BufferedImage charImage = swapColor(image, character.getBackgroundColor(), new Color(0, 0, 0, 0));
charImage = filter.filter(charImage, null);
// Combine image and background
final BufferedImage result = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
final Graphics2D gc = (Graphics2D) result.getGraphics();
gc.setColor(character.getBackgroundColor());
gc.fillRect(0, 0, result.getWidth(), result.getHeight());
gc.drawImage(charImage, 1, 0, null);
gc.drawImage(charImage, 0, 0, null);
gc.dispose();
return result;
}
示例2: run
import com.jhlabs.image.ChromeFilter; //导入依赖的package包/类
@Override
public BufferedImage run(final @NonNull BufferedImage image) {
final ChromeFilter filter = new ChromeFilter();
filter.setAmount(amount);
filter.setExposure(exposure);
return filter.filter(image, null);
}
示例3: createFilterList
import com.jhlabs.image.ChromeFilter; //导入依赖的package包/类
/**
* Create and return model for filter selection combobox.
*
* @return
*/
private ComboBoxModel createFilterList() {
DefaultComboBoxModel model = new DefaultComboBoxModel();
model.addElement(new DisplayInfo<BufferedImageOp>("- none - ", null));
model.addElement(new DisplayInfo<BufferedImageOp>(new AverageFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new BlockFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new BlurFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new BorderFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new BoxBlurFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new BumpFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new ChromeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new ContrastFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new CrystallizeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new DespeckleFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new DiffuseFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new DiffusionFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new DilateFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new DisplaceFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new DitherFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new EdgeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new EmbossFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new EqualizeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new ErodeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new FlareFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new GainFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new GammaFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new GaussianFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new GlintFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new GlowFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new GrayFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new InvertFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new InvertAlphaFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new LensBlurFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new LevelsFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new LifeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new MarbleFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new MarbleTexFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new MedianFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new MinimumFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new MirrorFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new MotionBlurFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new NoiseFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new OilFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new OpacityFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new OutlineFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new PointillizeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new PosterizeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new QuantizeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new RaysFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new ReduceNoiseFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new RippleFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new ShadowFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SharpenFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SkeletonFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SmearFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SolarizeFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SparkleFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SphereFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new SwimFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new ThresholdFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new TwirlFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new UnsharpFilter()));
model.addElement(new DisplayInfo<BufferedImageOp>(new WaterFilter()));
return model;
}