Examples of MemoryPaletted8Image


Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

    final int HEIGHT = in.getHeight();
    final int WIDTH = in.getWidth();
    final int MAX = 255;
    if (out == null)
    {
      out = new MemoryPaletted8Image(WIDTH, HEIGHT, quantizer.createPalette());
    }
    final int NUM_ERROR_PIXELS = errorNum.length;
    // create buffers
    int[] redBuffer = new int[newWidth * numRows];
    int[] greenBuffer = new int[newWidth * numRows];
 
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

  private void process(RGB24Image in, Paletted8Image out)
  {
    UniformPaletteQuantizer upq = new UniformPaletteQuantizer(redBits, greenBits, blueBits);
    if (out == null)
    {
      out = new MemoryPaletted8Image(in.getWidth(), in.getHeight(), upq.createPalette());
      setOutputImage(out);
    }
    int D1 = 4;
    int D2 = 4;
    int D1D2 = D1 * D2;
 
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

            index++;
          }
        }
      }
    }
    Paletted8Image out = new MemoryPaletted8Image(in.getWidth(), in.getHeight(), palette);
    for (int y = 0; y < in.getHeight(); y++)
    {
      for (int x = 0; x < in.getWidth(); x++)
      {
        int red = in.getSample(RGBIndex.INDEX_RED, x, y);
        int green = in.getSample(RGBIndex.INDEX_GREEN, x, y);
        int blue = in.getSample(RGBIndex.INDEX_BLUE, x, y);
        out.putSample(0, x, y, hist.getEntry(red, green, blue));
      }
      setProgress(y, in.getHeight());
    }
    outputImage = out;
  }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

            index++;
          }
        }
      }
    }
    Paletted8Image out = new MemoryPaletted8Image(in.getWidth(), in.getHeight(), palette);
    for (int y = 0; y < in.getHeight(); y++)
    {
      for (int x = 0; x < in.getWidth(); x++)
      {
        int red = in.getSample(RGBIndex.INDEX_RED, x, y) >> 8;
        int green = in.getSample(RGBIndex.INDEX_GREEN, x, y) >> 8;
        int blue = in.getSample(RGBIndex.INDEX_BLUE, x, y) >> 8;
        out.putSample(0, x, y, hist.getEntry(red, green, blue));
      }
      setProgress(y, in.getHeight());
    }
    outputImage = out;
  }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

    else
    {
      Palette palette = createPalette();
      if (out == null)
      {
        out = new MemoryPaletted8Image(in.getWidth(), in.getHeight(), palette);
        setOutputImage(out);
      }
      else
      {
        if (out instanceof Paletted8Image)
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

  {
    final int WIDTH = in.getWidth();
    final int HEIGHT = in.getHeight();
    if (out == null)
    {
      out = new MemoryPaletted8Image(WIDTH, HEIGHT, createPalette());
    }
    for (int y = 0; y < HEIGHT; y++)
    {
      for (int x = 0; x < WIDTH; x++)
      {
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

      throw new WrongParameterException("Unsupported input image type: " + in.getClass().getName());
    }
    PixelImage out = getOutputImage();
    if (out == null)
    {
      setOutputImage(new MemoryPaletted8Image(in.getWidth(), in.getHeight(), palette));
    }
    else
    {
      if (!(out instanceof Paletted8Image))
      {
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

          break;
        }
        case(TIFFImageFileDirectory.TYPE_PALETTED4):
        case(TIFFImageFileDirectory.TYPE_PALETTED8):
        {
          image = new MemoryPaletted8Image(width, height, ifd.getPalette());
          break;
        }
        case(TIFFImageFileDirectory.TYPE_CMYK32_INTERLEAVED):
        case(TIFFImageFileDirectory.TYPE_CMYK32_PLANAR):
        case(TIFFImageFileDirectory.TYPE_RGB24_INTERLEAVED):
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

    int bytesPerRow = 0;
    switch(depth)
    {
      case(8):
      {
        paletted8Image = new MemoryPaletted8Image(width, height, palette);
        result = paletted8Image;
        numChannels = 1;
        bytesPerRow = width;
        break;
      }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryPaletted8Image

  {
    final int WIDTH = in.getWidth();
    final int HEIGHT = in.getHeight();
    if (out == null)
    {
      out = new MemoryPaletted8Image(WIDTH, HEIGHT, createPalette());
    }
    for (int y = 0; y < HEIGHT; y++)
    {
      for (int x = 0; x < WIDTH; x++)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.