Examples of EncodeFromImage()


Examples of com.ngt.jopenmetaverse.shared.sim.imaging.IOpenJPEG.EncodeFromImage()

    {
      IBitmap origbitmap = new BitmapBufferedImageImpl(ImageIO.read(f));
      Assert.assertTrue(origbitmap.getHeight() > && origbitmap.getWidth() > 0);
      System.out.println(origbitmap.getHeight() + " : " + origbitmap.getWidth());
      IOpenJPEG iojpeg = new OpenJPEGFactoryImpl().getIntance();
      byte[] bytearray = iojpeg.EncodeFromImage(origbitmap, false);
      Assert.assertTrue(bytearray.length > 0);
      System.out.println("Output File: " + fileLocation.getPath() + "/" + f.getName() + ".jp2");
      FileOutputStream fos = new FileOutputStream(new File(fileLocation.getPath() + "/" + f.getName() + ".jp2"));
      fos.write(bytearray);
      fos.flush();
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.