|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.RgbShrink
public class RgbShrink
Shrinks a color (RgbImage) to a given size. Each band is shrunk independently. The pixels that each pixel maps to are averaged. There is no between-target-pixel smoothing. The output image must be smaller than or equal to the size of the input.
Constructor Summary | |
---|---|
RgbShrink(int cWidth,
int cHeight)
Creates a new instance of RgbShrink. |
Method Summary | |
---|---|
int |
getHeight()
Gets current target height |
int |
getWidth()
Gets current target width |
void |
push(Image image)
Process an image. |
java.lang.String |
toString()
Return a string describing the shrinking operation. |
Methods inherited from class jjil.core.PipelineStage |
---|
getFront, isEmpty |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RgbShrink(int cWidth, int cHeight) throws Error
cWidth
- new image widthcHeight
- new image height
Error
- if either is less than or equal to zero.Method Detail |
---|
public int getHeight()
public int getWidth()
public void push(Image image) throws Error
push
in class PipelineStage
image
- the input RgbImage.
Error
- if the input is not an RgbImage, or is smaller than the target image either
horizontally or vertically.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |