magick

Class MagickProducer

Implemented Interfaces:
ImageProducer

public class MagickProducer
extends Magick
implements ImageProducer

This class implements the ImageProducer class. It reads the pixels off a MagickImage and sends the pixels to the specified ImageConsumer.
Author:
Eric Yeo

Constructor Summary

MagickProducer(MagickImage image)
Constructor.

Method Summary

void
addConsumer(ImageConsumer consumer)
This method is used to register an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image.
boolean
isConsumer(ImageConsumer consumer)
This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.
void
removeConsumer(ImageConsumer consumer)
This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data.
void
requestTopDownLeftRightResend(ImageConsumer consumer)
This method is used by an ImageConsumer to request that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image.
void
startProduction(ImageConsumer consumer)
This method both registers the given ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which may have already been registered with the producer.

Methods inherited from class magick.Magick

parseImageGeometry

Constructor Details

MagickProducer

public MagickProducer(MagickImage image)
Constructor.
Parameters:
image - the MagickImage to produce an Image from

Method Details

addConsumer

public void addConsumer(ImageConsumer consumer)
This method is used to register an ImageConsumer with the ImageProducer for access to the image data during a later reconstruction of the Image.
Parameters:
consumer - to register with the producer

isConsumer

public boolean isConsumer(ImageConsumer consumer)
This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.
Parameters:
consumer - to consumer to register with the producer

removeConsumer

public void removeConsumer(ImageConsumer consumer)
This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data. It is not considered an error to remove a consumer that is not currently registered.
Parameters:
consumer - the consumer to check for registration

requestTopDownLeftRightResend

public void requestTopDownLeftRightResend(ImageConsumer consumer)
This method is used by an ImageConsumer to request that the ImageProducer attempt to resend the image data one more time in TOPDOWNLEFTRIGHT order so that higher quality conversion algorithms which depend on receiving pixels in order can be used to produce a better output version of the image.
Parameters:
consumer - the consumer to register before producing the image

startProduction

public void startProduction(ImageConsumer consumer)
This method both registers the given ImageConsumer object as a consumer and starts an immediate reconstruction of the image data which will then be delivered to this consumer and any other consumer which may have already been registered with the producer.
Parameters:
consumer - to be registered before producing the image