Examples of Gray8Image


Examples of net.sourceforge.jiu.data.Gray8Image

  {
    switch(precision)
    {
      case(8):
      {
        Gray8Image grayImage = (Gray8Image)image;
        int offset = getBoundsX1();
        int x = 0;
        int k = getBoundsWidth();
        while (k > 0)
        {
          grayImage.putSample(0, x++, y, buffer[offset++]);
          offset++; // skip alpha; should be stored in a TransparencyInformation object
          k--;
        }
        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
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.