Package magick

Class MagickProducer

java.lang.Object
magick.Magick
magick.MagickProducer
All 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

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    This method determines if a given ImageConsumer object is currently registered with this ImageProducer as one of its consumers.
    void
    This method removes the given ImageConsumer object from the list of consumers currently registered to receive image data.
    void
    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
    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, queryFonts

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.
      Specified by:
      addConsumer in interface ImageProducer
      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.
      Specified by:
      isConsumer in interface ImageProducer
      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.
      Specified by:
      removeConsumer in interface ImageProducer
      Parameters:
      consumer - the consumer to check for registration
    • 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.
      Specified by:
      startProduction in interface ImageProducer
      Parameters:
      consumer - to be registered before producing the image
    • 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.
      Specified by:
      requestTopDownLeftRightResend in interface ImageProducer
      Parameters:
      consumer - the consumer to register before producing the image