Examples of MemoryRGB24Image


Examples of net.sourceforge.jiu.data.MemoryRGB24Image

  {
    //UniformPaletteQuantizer upq = new UniformPaletteQuantizer(redBits, greenBits, blueBits);
    //System.out.println("RGB=>RGB, r=" + redBits+  ", g=" + greenBits + ", b=" + blueBits);
    if (out == null)
    {
      out = new MemoryRGB24Image(in.getWidth(), in.getHeight());
      setOutputImage(out);
    }
    int D1 = 4;
    int D2 = 4;
    int D1D2 = D1 * D2;
 
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

   * becomes a pixel in an image of width 1 and height
   * palette.getNumEntries().
   */
  public static RGB24Image convertPaletteToImage(Palette palette)
  {
    RGB24Image result = new MemoryRGB24Image(1, palette.getNumEntries());
    for (int index = 0; index < palette.getNumEntries(); index++)
    {
      result.putSample(INDEX_RED, 0, index, palette.getSample(INDEX_RED, index));
      result.putSample(INDEX_GREEN, 0, index, palette.getSample(INDEX_GREEN, index));
      result.putSample(INDEX_BLUE, 0, index, palette.getSample(INDEX_BLUE, index));
    }
    return result;
  }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

    int maxShiftedValue = (1 << bits) - 1;
    if (bits <= 8)
    {
      if (out == null)
      {
        out = new MemoryRGB24Image(in.getWidth(), in.getHeight());
        setOutputImage(out);
      }
      else
      {
        if (!(out instanceof RGB24Image))
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

        else
        {
          type = TYPE_RGB24;
          if (doConvert)
          {
            outputImage = new MemoryRGB24Image(inputImage.getWidth(), inputImage.getHeight());
            createRgb24FromRgb48((RGB48Image)inputImage, (RGB24Image)outputImage);
          }
        }
      }
    }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

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

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

        case(TIFFImageFileDirectory.TYPE_CMYK32_INTERLEAVED):
        case(TIFFImageFileDirectory.TYPE_CMYK32_PLANAR):
        case(TIFFImageFileDirectory.TYPE_RGB24_INTERLEAVED):
        case(TIFFImageFileDirectory.TYPE_LOGLUV32_INTERLEAVED):
        {
          image = new MemoryRGB24Image(width, height);
          break;
        }
        case(TIFFImageFileDirectory.TYPE_RGB48_INTERLEAVED):
        {
          image = new MemoryRGB48Image(width, height);
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

        bytesPerRow = width;
        break;
      }
      case(24):
      {
        rgb24Image = new MemoryRGB24Image(width, height);
        result = rgb24Image;
        numChannels = 3;
        bytesPerRow = width;
        break;
      }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

      return image;
    }
    else
    if (performColorConversion)
    {
      RGB24Image image = new MemoryRGB24Image(width, height);
      int offset = 0;
      for (int y = 0; y < height; y++)
      {
        for (int x = 0; x < width; x++)
        {
          image.putByteSample(RGB24Image.INDEX_RED, x, y, data[0][offset]);
          image.putByteSample(RGB24Image.INDEX_GREEN, x, y, data[1][offset]);
          image.putByteSample(RGB24Image.INDEX_BLUE, x, y, data[2][offset]);
          offset++;
        }
      }
      return image;
    }
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

    PixelImage image = null;
    Paletted8Image palettedImage = null;
    RGB24Image rgbImage = null;
    if (numPlanes == 24 || ham)
    {
      rgbImage = new MemoryRGB24Image(getBoundsWidth(), getBoundsHeight());
      image = rgbImage;
    }
    else
    {
      palettedImage = new MemoryPaletted8Image(getBoundsWidth(), getBoundsHeight(), palette);
View Full Code Here

Examples of net.sourceforge.jiu.data.MemoryRGB24Image

    else
    if (colorType == COLOR_TYPE_RGB || colorType == COLOR_TYPE_RGB_ALPHA)
    {
      if (precision == 8)
      {
        image = new MemoryRGB24Image(w, h);
      }
      else
      {
        image = new MemoryRGB48Image(w, h);
      }
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.