Package net.sourceforge.jiu.data

Examples of net.sourceforge.jiu.data.Gray16Image


    MissingParameterException,
    WrongParameterException
  {
    PixelImage in = getInputImage();
    prepare(in);
    Gray16Image out = (Gray16Image)getOutputImage();
    if (in instanceof BilevelImage)
    {
      process((BilevelImage)in, out);
    }
    else
View Full Code Here


      bilevelImage.getPackedBytes(x1, y, w, row, offs, 0);
    }
    else
    if (image instanceof Gray16Image)
    {
      Gray16Image grayImage = (Gray16Image)image;
      while (w-- > 0)
      {
        short sample = grayImage.getShortSample(x1++, y);
        ArrayConverter.setShortBE(row, offs, sample);
        offs += 2;
      }
    }
    else
    if (image instanceof Gray8Image)
    {
      Gray8Image grayImage = (Gray8Image)image;
      grayImage.getByteSamples(0, getBoundsX1(), y, getBoundsWidth(), 1, row, offs);
    }
    else
    if (image instanceof Paletted8Image)
    {
      Paletted8Image palImage = (Paletted8Image)image;
View Full Code Here

        }
        break;
      }
      case(16):
      {
        Gray16Image grayImage = (Gray16Image)image;
        while (x <= x2)
        {
          if (x >= x1)
          {
            int sample = (buffer[offset] & 0xff) << 8;
            sample |= (buffer[offset + 1] & 0xff);
            grayImage.putSample(x, y, sample);
          }
          x += incr;
          offset += 2;
        }
        break;
View Full Code Here

        }
        break;
      }
      case(16):
      {
        Gray16Image grayImage = (Gray16Image)image;
        while (x <= x2)
        {
          if (x >= x1)
          {
            int sample = (buffer[offset] & 0xff) << 8;
            sample |= (buffer[offset + 1] & 0xff);
            grayImage.putSample(x, y, sample);
            // store alpha
          }
          x += incr;
          offset += 4;
        }
View Full Code Here

        }
        break;
      }
      case(16):
      {
        Gray16Image grayImage = (Gray16Image)image;
        int offset = getBoundsX1();
        int x = 0;
        int k = getBoundsWidth();
        while (k > 0)
        {
          int sample = (buffer[offset++] & 0xff) << 8;
          sample |= (buffer[offset++] & 0xff);
          grayImage.putSample(x++, y, sample);
          k--;
        }
        break;
      }
    }
View Full Code Here

        }
        break;
      }
      case(16):
      {
        Gray16Image grayImage = (Gray16Image)image;
        int offset = getBoundsX1();
        int x = 0;
        int k = getBoundsWidth();
        while (k > 0)
        {
          int sample = (buffer[offset++] & 0xff) << 8;
          sample |= (buffer[offset++] & 0xff);
          grayImage.putSample(x++, y, sample);
          offset += 2; // skip alpha;  TODO: store in TransparencyInformation object
          k--;
        }
        break;
      }
View Full Code Here

TOP

Related Classes of net.sourceforge.jiu.data.Gray16Image

Copyright © 2018 www.massapicom. 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.