Package net.sourceforge.jiu.data

Examples of net.sourceforge.jiu.data.GrayIntegerImage


      setImage(pimage);
    }
    else
    {
    }
    GrayIntegerImage image = (GrayIntegerImage)pimage;
    int[] buffer = new int[width];
    for (int y = 0, destY = -getBoundsY1(); destY < getBoundsHeight(); y++, destY++)
    {
      if (getAscii().booleanValue())
      {
        for (int x = 0; x < width; x++)
        {
          buffer[x] = loadAsciiNumber();
        }
      }
      else
      {
        if (maxSample < 256)
        {
          for (int x = 0; x < width; x++)
          {
            buffer[x] = in.read();
          }
        }
        else
        {
          for (int x = 0; x < width; x++)
          {
            int msb = in.read();
            int lsb = in.read();
            buffer[x] = (msb << 8) | lsb;
          }
        }
      }
      if (destY >= 0 && destY < getBoundsHeight())
      {
        image.putSamples(0, 0, destY, getBoundsWidth(), 1, buffer, getBoundsX1());
      }
      setProgress(y, getBoundsY2() + 1);
    }
  }
View Full Code Here

TOP

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

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.