Class WrappedBufferedImageServer

All Implemented Interfaces:
AutoCloseable, ImageServer<BufferedImage>

public class WrappedBufferedImageServer extends AbstractTileableImageServer
Implementation of an ImageServer that simply wraps an existing BufferedImage.

This may help whenever requiring a server, but only having a BufferedImage.

Author:
Pete Bankhead
  • Constructor Details

    • WrappedBufferedImageServer

      public WrappedBufferedImageServer(String imageName, BufferedImage img)
      Create an ImageServer<BufferedImage> using an image that has been provided directly.
      Parameters:
      imageName - a name to display (may be null)
      img - the BufferedImage to wrap
    • WrappedBufferedImageServer

      public WrappedBufferedImageServer(String imageName, BufferedImage img, List<ImageChannel> channels)
      Create an ImageServer<BufferedImage> using an image that has been provided directly.
      Parameters:
      imageName - a name to display (may be null)
      img - the BufferedImage to wrap
      channels - the ImageChannels, required in case the preferred channel colors cannot be obtained from the image itself
  • Method Details