Examples of RawEncodedImage


Examples of quicktime.util.RawEncodedImage

  {

    // extract the raw image from the sample

    final RawEncodedImage rawIm = RawEncodedImage.fromQTHandle(mediaSample.data);

    dSeq.decompressFrameS(rawIm, 0);

    // the raw image is rendered into qdGraphics, being decompressed

    // as it goes

    rawIm.disposeQTObject();



    /*

     * Make the data buffer of the img BufferedImage accessible via a pixel

     * array (imgPixelData[]).

     */

    final WritableRaster tile = img.getWritableTile(0, 0);

    int[] imgPixelData = ((DataBufferInt) tile.getDataBuffer()).getData();



    // pull a raw image from qdGraphics (this one will be decompressed)

    final RawEncodedImage rawIm2 = qdGraphics.getPixMap().getPixelData();



    /*

     * Transfer the raw image into the img BufferedImage via a

     * imgPixelData[] pixel array. This is simple if the size of the raw

     * image matches the destination pixel array (see the else branch),

     * otherwise, only a subset is copied over (see the if branch).

     */

    if (rowInts != width)

    {

      /*

       * Copy raw image to pixData[], then a subset of pixData[] into

       * imgPixelData[].

       */

      rawIm2.copyToArray(0, pixData, 0, pixData.length);

      int pixIndex = 0, destPixIndex = 0;

      for (int row = 0; row < height; row++)

      {

        int cLimit = pixIndex + width;

        for (int cIndex = pixIndex; cIndex < cLimit; cIndex++)

          imgPixelData[destPixIndex++] = pixData[cIndex];

        pixIndex += rowInts;

      }

    } else

    // copy raw image to imgPixelData[] in one step

      rawIm2.copyToArray(0, imgPixelData, 0, width * height);

    }

    img.releaseWritableTile(0, 0); // release Raster access to image

View Full Code Here

Examples of quicktime.util.RawEncodedImage

      int rawImageSize = QTImage.getMaxCompressionSize(gw, gRect,
        gw.getPixMap().getPixelSize(), StdQTConstants.codecLosslessQuality,
        CODEC_TYPE, CodecComponent.bestFidelityCodec);
      QTHandle imageHandle = new QTHandle(rawImageSize, true);
      imageHandle.lock();
      RawEncodedImage compressed = RawEncodedImage.fromQTHandle(imageHandle);
      CSequence seq = new CSequence(gw, gRect, gw.getPixMap().getPixelSize(),
        CODEC_TYPE, CodecComponent.bestFidelityCodec,
        StdQTConstants.codecLosslessQuality,
        StdQTConstants.codecLosslessQuality,
        KEY_FRAME_RATE, null, StdQTConstants.codecFlagUpdatePrevious);
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */
/*     */   private static RawEncodedImage privateGetData(GraphicsImporter paramGraphicsImporter)
/*     */     throws QTException
/*     */   {
/*  50 */     int i = paramGraphicsImporter.getDataSize();
/*  51 */     RawEncodedImage localRawEncodedImage = new RawEncodedImage(i, true);
/*  52 */     paramGraphicsImporter.readData(localRawEncodedImage, paramGraphicsImporter.getDataOffset(), i);
/*  53 */     return localRawEncodedImage;
/*     */   }
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */
/*     */   private static EncodedImage getDummyEI()
/*     */     throws QTException
/*     */   {
/*  52 */     if (ei == null)
/*  53 */       ei = new RawEncodedImage(4, true);
/*  54 */     return ei;
/*     */   }
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */   }
/*     */
/*     */   private synchronized void copyPixels()
/*     */     throws QTException
/*     */   {
/* 277 */     RawEncodedImage localRawEncodedImage = this.pm.getPixelData();
/* 278 */     localRawEncodedImage.copyToArray(0, this.pixels, 0, this.pixels.length);
/*     */   }
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */   }
/*     */
/*     */   private synchronized void copyPixels()
/*     */     throws QTException
/*     */   {
/* 281 */     RawEncodedImage localRawEncodedImage = this.pm.getPixelData();
/* 282 */     localRawEncodedImage.copyToArray(0, this.pixels, 0, this.pixels.length);
/*     */   }
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */     }
/*     */   }
/*     */
/*     */   private void doSingleFrame() throws QTException
/*     */   {
/* 271 */     this.rei = new RawEncodedImage(this.iData.getInts());
/* 272 */     this.image.setImageData(this.rei);
/* 273 */     this.iData = null;
/* 274 */     this.offscreenImage.flush();
/* 275 */     this.offscreenImage = null;
/*     */   }
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/* 318 */         return ImagePresenter.fromQTImage(this.rei, (ImageDescription)this.image.getDescription().clone());
/*     */       }
/* 320 */       return ImagePresenter.fromQTImage((EncodedImage)this.rei.clone(), (ImageDescription)this.image.getDescription().clone());
/*     */     }
/*     */
/* 323 */     return ImagePresenter.fromQTImage(new RawEncodedImage(this.iData.getInts()), (ImageDescription)this.image.getDescription().clone());
/*     */   }
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */
/*     */   /** @deprecated */
/*     */   public int compressFrame(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt)
/*     */     throws QTException
/*     */   {
/* 149 */     RawEncodedImage localRawEncodedImage = new RawEncodedImage(this.seq.getMaxCompressionSize(paramQDGraphics), true);
/*     */
/* 151 */     CompressedFrameInfo localCompressedFrameInfo = this.seq.compressFrame(paramQDGraphics, paramQDRect, paramInt, localRawEncodedImage);
/*     */
/* 153 */     localRawEncodedImage.setSize(localCompressedFrameInfo.getDataSize());
/*     */     try
/*     */     {
/* 160 */       int i = this.seq.getFrameNumber() - 1;
/*     */
/* 162 */       if (i < this.frames.size()) {
View Full Code Here

Examples of quicktime.util.RawEncodedImage

/*     */   /** @deprecated */
/*     */   public static ImagePresenter fromGWorld(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, int paramInt3, CodecComponent paramCodecComponent)
/*     */     throws QTException
/*     */   {
/* 127 */     int i = QTImage.getMaxCompressionSize(paramQDGraphics, paramQDRect, paramInt1, paramInt2, paramInt3, paramCodecComponent);
/* 128 */     RawEncodedImage localRawEncodedImage = new RawEncodedImage(i, true);
/* 129 */     ImageDescription localImageDescription = QTImage.compress(paramQDGraphics, paramQDRect, paramInt2, paramInt3, localRawEncodedImage);
/* 130 */     localRawEncodedImage.setSize(localImageDescription.getDataSize());
/* 131 */     ImagePresenter localImagePresenter = new ImagePresenter(paramQDRect);
/* 132 */     localImagePresenter.optimiseRedraw = false;
/* 133 */     localImagePresenter.setImageData(localRawEncodedImage, localImageDescription);
/* 134 */     return localImagePresenter;
/*     */   }
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.