Package ij.io

Examples of ij.io.TiffEncoder


    //writeUsingMMCComputingImageIO(bi, os);
  }
 
  private void writeUsingImageJ(BufferedImage bi, OutputStream os) throws FormatIOException {
    ImagePlus imp = new ImagePlus("tempTif", bi);
    TiffEncoder encoder = new TiffEncoder(imp.getFileInfo());
    DataOutputStream out = new DataOutputStream(new BufferedOutputStream(os));
    try {
      encoder.write(out);
    } catch (IOException e) {
      logger.error(e);
      throw new FormatIOException(e);
    }
  }
View Full Code Here


     * @param aOutStream OutputStream to output the image to
     * @throws FormatIOException
     */
    public void write(BufferedImage aImage, OutputStream aOutStream) throws FormatIOException {
        ImagePlus imagePlus = new ImagePlus("tempTif", aImage);
        TiffEncoder encoder = new TiffEncoder(imagePlus.getFileInfo());
        BufferedOutputStream bufStream = new BufferedOutputStream(aOutStream);
        DataOutputStream out = new DataOutputStream(bufStream);

        try {
            encoder.write(out);
        } catch (IOException e) {
            LOGGER.error(e.getMessage(), e);
            throw new FormatIOException(e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of ij.io.TiffEncoder

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.