info.magnolia.imaging.operations.load
Class Blank<P extends ParameterProvider<?>>

java.lang.Object
  extended by info.magnolia.imaging.operations.load.Blank<P>
Type Parameters:
P - type of the ParameterProvider
All Implemented Interfaces:
ImageOperation<P>

public class Blank<P extends ParameterProvider<?>>
extends Object
implements ImageOperation<P>

Just generates an empty BufferedImage canvas, fills it with the specified color if any. Use this if you don't use an image background. TODO -- maybe merge this into ImageGenerator. At least provide a simpler way for non-transparent images...

Version:
$Id$

Constructor Summary
Blank()
           
Blank(Color backgroundColor, int width, int height)
           
Blank(int type, Color backgroundColor, int width, int height)
           
Blank(int width, int height)
           
 
Method Summary
 BufferedImage apply(BufferedImage source, P params)
           
 Color getBackgroundColor()
           
 int getHeight()
           
 int getType()
           
 int getWidth()
           
 void setBackgroundColor(Color backgroundColor)
          Background color for the new canvas.
 void setHeight(int height)
           
 void setType(int type)
          One of BufferedImage.TYPE_*; defaults to TYPE_INT_ARGB_PRE.
 void setWidth(int width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Blank

public Blank()

Blank

public Blank(int width,
             int height)

Blank

public Blank(Color backgroundColor,
             int width,
             int height)

Blank

public Blank(int type,
             Color backgroundColor,
             int width,
             int height)
Method Detail

apply

public BufferedImage apply(BufferedImage source,
                           P params)
                    throws ImagingException
Specified by:
apply in interface ImageOperation<P extends ParameterProvider<?>>
Throws:
ImagingException

getType

public int getType()

setType

public void setType(int type)
One of BufferedImage.TYPE_*; defaults to TYPE_INT_ARGB_PRE.

See Also:
BufferedImage.TYPE_INT_ARGB_PRE

getBackgroundColor

public Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)
Background color for the new canvas. Default to white.


getWidth

public int getWidth()

setWidth

public void setWidth(int width)

getHeight

public int getHeight()

setHeight

public void setHeight(int height)


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.