Images

Types of images (classes)

  • ImageProcessor: super-class (abstract)
  • ByteProcessor: unsigned 8-bit image
  • ShortProcessor: unsigned 16-bit image
  • FloatProcessor: 32-bit floating-point image
  • ColorProcessor: 24-bit RGB color image

Creating new images

Constructors

  • ByteProcessor(int w, int h)
  • ByteProcessor(int w, int h, byte[] pixels)
  • ByteProcessor(java.awt.Image im)
  • ShortProcessor(int w, int h)
  • ShortProcessor(int w, int h, short[] p, ColorModel c)
  • ShortProcessor(java.awt.BufferedImage im)
  • FloatProcessor(int w, int h)
  • FloatProcessor(int w, int h, float[] pixels)
  • FloatProcessor(int w, int h, double[] pixels)
  • FloatProcessor(float[][] pixels)
  • FloatProcessor(int[][] pixels)
  • ColorProcessor(int w, int h)
  • ColorProcessor(int w, int h, int[] pixels)
  • ColorProcessor(java.awt.Image im)

Example

ImageProcessor ip = new ByteProcessor(640, 480);

Duplicating images (class ImageProcessor)

  • ImageProcessor createProcessor(int w, int h)
  • ImageProcessor duplicate()

Example

ImageProcessor ipA = new ColorProcessor(640, 480);
ImageProcessor ipB = ipA.createProcessor(300, 200);

Converting images

Image parameters

Displaying images

Accessing pixels

Multi-pixel access

Advertisements