Package com.ngt.jopenmetaverse.shared.sim.imaging

Examples of com.ngt.jopenmetaverse.shared.sim.imaging.ManagedImage


  {
    try {
      String imagePath1 = FileUtils.combineFilePath(fileLocation.getPath(), imageName);
      byte[] bytes1 = FileUtils.readBytes(new File(imagePath1));
      DecodeToImageResult decodeToImageResult = iOpenJPEG.DecodeToImage2(bytes1);
      ManagedImage mi = decodeToImageResult.getManagedImage();
     
    }
    catch (Exception e)
    {
      Assert.fail(Utils.getExceptionStackTraceAsString(e));
View Full Code Here


        BitmapBufferedImageImpl bitmap = new BitmapBufferedImageImpl(JclientTGADecoder.loadImage(is));
        is.close();
        int width = bitmap.getWidth();
        int height = bitmap.getHeight();
       
        ManagedImage inputImage = new ManagedImage(bitmap);
        byte[] inputImagePixels = inputImage.ExportRaw();

        File[] compiledfiles = FileUtils.getFileList(resourceLocation + "/compiled", f.getName() + ".bin", true);
        Assert.assertTrue("No File or Multiple files exists with name: " + f.getName()  + " on path: " + resourceLocation + "/compiled",
            compiledfiles.length == 1 );
View Full Code Here

    return new BitmapBufferedImageImpl(img);
  }
 
  public DecodeToImageResult DecodeToImage2(byte[] encoded) throws Exception {
    IBitmap img2 = DecodeToIBitMap(encoded);
    return new DecodeToImageResult(new ManagedImage(img2), img2);
  }
View Full Code Here

            AssetTexture assetTexture = e.getAssetTexture();

            if (state == TextureRequestState.Finished)
            {
              try{
                ManagedImage mi = OpenJPEGFactory.getIntance().DecodeToImage(assetTexture.AssetData);

                if (removeAlpha)
                {
                  if ((ImageChannels.and(mi.Channels,  ManagedImage.ImageChannels.Alpha)) != 0)
                  {
                    mi.ConvertChannels(ImageChannels.get(ImageChannels.and(mi.Channels, ~ManagedImage.ImageChannels.Alpha.getIndex())));
                  }
                }
                byte[] tgaData = mi.ExportTGA();
               
                texDownloadResult[0] = LoadTGAClass.LoadTGA(new ByteArrayInputStream(tgaData));               
                client.assets.Cache.compressAndSaveImageToCache(textureID, tgaData, ImageChannels.and(mi.Channels, ManagedImage.ImageChannels.Alpha) != 0, false, false);
              }
              catch(Exception ex)
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.imaging.ManagedImage

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.