public ProcessorStage copy() { return new ProcessorStage(get()).pipeline(COPIER); }
public ProcessorStage compress(float compressionQuality) { return new ProcessorStage(get()).compressionQuality(compressionQuality).pipeline(COPIER); }
public Blur.Stage blur(int level) { return new Blur.Stage(get()).level(level); }
public Resizer.Stage resize(int w, int h) { return new Resizer.Stage(get()).dimension(w, h); }
public Blur.Stage blur() { return new Blur.Stage(get()); }
public TextWriter.Stage watermark(String text) { return new TextWriter.Stage(get()).color(Color.LIGHT_GRAY).alpha(0.8f).rotate(-Math.PI / 7).offset(-130, 80).text(text); }
public Cropper.Stage crop(int x1, int y1, int x2, int y2) { return new Cropper.Stage(get()).from(x1, y1).to(x2, y2); }
public Cropper.Stage crop() { return new Cropper.Stage(get()); }
public Resizer.Stage resize(float scale) { return new Resizer.Stage(get()).scale(scale); }
public Concatenater.Stage appendWith($.Func0<BufferedImage> secondImange) { return new Concatenater.Stage(get()).with(secondImange); }
public TextWriter.Stage text(String text) { return new TextWriter.Stage(get()).text(text); }
public <B extends ProcessorStage<B, P>, P extends Processor<P, B>> B pipeline(Class<? extends P> processorClass) { return $.newInstance(processorClass).createStage(get()); }
public Flip.Stage flip(Direction dir) { return new Flip.Stage(get()).dir(dir); }
public Concatenater.Stage appendWith(BufferedImage secondImange) { return new Concatenater.Stage(get()).with(F.source(secondImange)); }
public NoiseMaker.Stage makeNoise() { return new NoiseMaker.Stage(get()); }
public Resizer.Stage resize() { return new Resizer.Stage(get()); }
@Override public BufferedImage produce() { return Img.source(Img.F.background(w, h, bgColor).get()).get(); }
/** * Pipeline the target image as an input (source) image to to another processor * * @param processor the next processor * @param <B> the processor builder type * @param <P> the processor type * @return a {@link ProcessBuilder} for the processor specified */ public <B extends ProcessorStage<B, P>, P extends Processor<P, B>> B pipeline(P processor) { return processor.createStage(get()); }
@Override public BufferedImage produce() { return Img.source(Img.F.background(w, h, bgColor).get()).get(); }
/** * Pipeline the target image as an input (source) image to to another processor * * @param processor the next processor * @param <B> the processor builder type * @param <P> the processor type * @return a {@link ProcessBuilder} for the processor specified */ public <B extends ProcessorStage<B, P>, P extends Processor<P, B>> B pipeline(P processor) { return processor.createStage(get()); }