Package quicktime.std.image

Source Code of quicktime.std.image.QTImage

/*     */ package quicktime.std.image;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.jdirect.QTNative;
/*     */ import quicktime.qd.ColorTable;
/*     */ import quicktime.qd.PixMap;
/*     */ import quicktime.qd.QDException;
/*     */ import quicktime.qd.QDGraphics;
/*     */ import quicktime.qd.QDRect;
/*     */ import quicktime.qd.Region;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.util.ByteEncodedImage;
/*     */ import quicktime.util.EncodedImage;
/*     */ import quicktime.util.IntEncodedImage;
/*     */ import quicktime.util.QTUtils;
/*     */ import quicktime.util.RawEncodedImage;
/*     */
/*     */ public class QTImage
/*     */ {
/*  32 */   private static final int[] savedPort = { 0 };
/*  33 */   private static final int[] savedDevice = { 0 };
/*     */   private ImageDescription desc;
/*     */   private EncodedImage data;
/*     */
/*     */   public QTImage(ImageDescription paramImageDescription, EncodedImage paramEncodedImage)
/*     */   {
/*  43 */     this.data = paramEncodedImage;
/*  44 */     this.desc = paramImageDescription;
/*     */   }
/*     */
/*     */   public EncodedImage getImage() {
/*  48 */     return this.data;
/*     */   }
/*     */   public ImageDescription getDescription() {
/*  51 */     return this.desc;
/*     */   }
/*     */
/*     */   public static final ImageDescription compress(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, EncodedImage paramEncodedImage)
/*     */     throws QTException
/*     */   {
/*  77 */     ImageDescription localImageDescription = new ImageDescription(0);
/*  78 */     if (paramQDGraphics == null) {
/*  79 */       throw new StdQTException(-50);
/*     */     }
/*  81 */     int i = -50;
/*     */
/*  83 */     synchronized (QTNative.globalsLock) {
/*  84 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/*  85 */         GetGWorld(savedPort, savedDevice);
/*  86 */       SetGWorld(QTObject.ID(paramQDGraphics), 0);
/*  87 */       if ((paramEncodedImage instanceof ByteEncodedImage)) {
/*  88 */         i = CompressImage(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), paramInt1, paramInt2, QTObject.ID(localImageDescription), ((ByteEncodedImage)paramEncodedImage).getBytes());
/*     */       }
/*  94 */       else if ((paramEncodedImage instanceof IntEncodedImage)) {
/*  95 */         i = CompressImage(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), paramInt1, paramInt2, QTObject.ID(localImageDescription), ((IntEncodedImage)paramEncodedImage).getInts());
/*     */       }
/* 101 */       else if ((paramEncodedImage instanceof RawEncodedImage)) {
/* 102 */         i = CompressImage(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), paramInt1, paramInt2, QTObject.ID(localImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage));
/*     */       }
/*     */
/* 108 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 109 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */     }
/* 111 */     StdQTException.checkError(i);
/* 112 */     return localImageDescription;
/*     */   }
/*     */
/*     */   public static final ImageDescription fCompress(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, int paramInt3, CodecComponent paramCodecComponent, ColorTable paramColorTable, int paramInt4, EncodedImage paramEncodedImage)
/*     */     throws QTException
/*     */   {
/* 140 */     ImageDescription localImageDescription = new ImageDescription(0);
/*     */
/* 142 */     if (paramQDGraphics == null) {
/* 143 */       throw new StdQTException(-50);
/*     */     }
/* 145 */     int i = -50;
/* 146 */     synchronized (QTNative.globalsLock) {
/* 147 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 148 */         GetGWorld(savedPort, savedDevice);
/* 149 */       SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 150 */       if ((paramEncodedImage instanceof ByteEncodedImage)) {
/* 151 */         i = FCompressImage(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), (short)paramInt1, paramInt2, paramInt3, QTObject.ID(paramCodecComponent), QTObject.ID(paramColorTable), (short)paramInt4, 0, 0, 0, QTObject.ID(localImageDescription), ((ByteEncodedImage)paramEncodedImage).getBytes());
/*     */       }
/* 162 */       else if ((paramEncodedImage instanceof IntEncodedImage)) {
/* 163 */         i = FCompressImage(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), (short)paramInt1, paramInt2, paramInt3, QTObject.ID(paramCodecComponent), QTObject.ID(paramColorTable), (short)paramInt4, 0, 0, 0, QTObject.ID(localImageDescription), ((IntEncodedImage)paramEncodedImage).getInts());
/*     */       }
/* 174 */       else if ((paramEncodedImage instanceof RawEncodedImage)) {
/* 175 */         i = FCompressImage(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), (short)paramInt1, paramInt2, paramInt3, QTObject.ID(paramCodecComponent), QTObject.ID(paramColorTable), (short)paramInt4, 0, 0, 0, QTObject.ID(localImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage));
/*     */       }
/*     */
/* 186 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 187 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */     }
/* 189 */     StdQTException.checkError(i);
/* 190 */     return localImageDescription;
/*     */   }
/*     */
/*     */   public static final ImageDescription convert(ImageDescription paramImageDescription, EncodedImage paramEncodedImage1, int paramInt1, ColorTable paramColorTable, int paramInt2, int paramInt3, int paramInt4, CodecComponent paramCodecComponent, EncodedImage paramEncodedImage2)
/*     */     throws QTException
/*     */   {
/* 222 */     ImageDescription localImageDescription = new ImageDescription(0);
/* 223 */     int i = -50;
/* 224 */     if ((paramEncodedImage1 instanceof ByteEncodedImage)) {
/* 225 */       if ((paramEncodedImage2 instanceof ByteEncodedImage)) {
/* 226 */         i = ConvertImage(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage1).getBytes(), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), ((ByteEncodedImage)paramEncodedImage2).getBytes());
/*     */       }
/* 236 */       else if ((paramEncodedImage2 instanceof IntEncodedImage)) {
/* 237 */         i = ConvertImage(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage1).getBytes(), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), ((IntEncodedImage)paramEncodedImage2).getInts());
/*     */       }
/* 247 */       else if ((paramEncodedImage2 instanceof RawEncodedImage)) {
/* 248 */         i = ConvertImage(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage1).getBytes(), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage2));
/*     */       }
/*     */
/*     */     }
/* 258 */     else if ((paramEncodedImage1 instanceof IntEncodedImage)) {
/* 259 */       if ((paramEncodedImage2 instanceof ByteEncodedImage)) {
/* 260 */         i = ConvertImage(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage1).getInts(), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), ((ByteEncodedImage)paramEncodedImage2).getBytes());
/*     */       }
/* 270 */       else if ((paramEncodedImage2 instanceof IntEncodedImage)) {
/* 271 */         i = ConvertImage(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage1).getInts(), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), ((IntEncodedImage)paramEncodedImage2).getInts());
/*     */       }
/* 281 */       else if ((paramEncodedImage2 instanceof RawEncodedImage)) {
/* 282 */         i = ConvertImage(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage1).getInts(), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage2));
/*     */       }
/*     */
/*     */     }
/* 292 */     else if ((paramEncodedImage1 instanceof RawEncodedImage)) {
/* 293 */       if ((paramEncodedImage2 instanceof ByteEncodedImage)) {
/* 294 */         i = ConvertImage(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage1), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), ((ByteEncodedImage)paramEncodedImage2).getBytes());
/*     */       }
/* 304 */       else if ((paramEncodedImage2 instanceof IntEncodedImage)) {
/* 305 */         i = ConvertImage(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage1), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), ((IntEncodedImage)paramEncodedImage2).getInts());
/*     */       }
/* 315 */       else if ((paramEncodedImage2 instanceof RawEncodedImage)) {
/* 316 */         i = ConvertImage(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage1), (short)paramInt1, QTObject.ID(paramColorTable), paramInt2, paramInt3, paramInt4, QTObject.ID(paramCodecComponent), QTObject.ID(localImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage2));
/*     */       }
/*     */
/*     */     }
/*     */
/* 328 */     StdQTException.checkError(i);
/* 329 */     return localImageDescription;
/*     */   }
/*     */
/*     */   public static final void trim(ImageDescription paramImageDescription, EncodedImage paramEncodedImage1, EncodedImage paramEncodedImage2, QDRect paramQDRect)
/*     */     throws StdQTException
/*     */   {
/* 350 */     int i = -50;
/* 351 */     if ((paramEncodedImage1 instanceof ByteEncodedImage)) {
/* 352 */       if ((paramEncodedImage2 instanceof ByteEncodedImage)) {
/* 353 */         i = TrimImage(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage1).getBytes(), 0, 0, ((ByteEncodedImage)paramEncodedImage2).getBytes(), 0, 0, paramQDRect.getRect(), 0);
/*     */       }
/* 362 */       else if ((paramEncodedImage2 instanceof IntEncodedImage)) {
/* 363 */         i = TrimImage(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage1).getBytes(), 0, 0, ((IntEncodedImage)paramEncodedImage2).getInts(), 0, 0, paramQDRect.getRect(), 0);
/*     */       }
/* 372 */       else if ((paramEncodedImage2 instanceof RawEncodedImage)) {
/* 373 */         i = TrimImage(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage1).getBytes(), 0, 0, QTObject.ID((RawEncodedImage)paramEncodedImage2), 0, 0, paramQDRect.getRect(), 0);
/*     */       }
/*     */
/*     */     }
/* 382 */     else if ((paramEncodedImage1 instanceof IntEncodedImage)) {
/* 383 */       if ((paramEncodedImage2 instanceof ByteEncodedImage)) {
/* 384 */         i = TrimImage(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage1).getInts(), 0, 0, ((ByteEncodedImage)paramEncodedImage2).getBytes(), 0, 0, paramQDRect.getBytes(), 0);
/*     */       }
/* 393 */       else if ((paramEncodedImage2 instanceof IntEncodedImage)) {
/* 394 */         i = TrimImage(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage1).getInts(), 0, 0, ((IntEncodedImage)paramEncodedImage2).getInts(), 0, 0, paramQDRect.getBytes(), 0);
/*     */       }
/* 403 */       else if ((paramEncodedImage2 instanceof RawEncodedImage)) {
/* 404 */         i = TrimImage(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage1).getInts(), 0, 0, QTObject.ID((RawEncodedImage)paramEncodedImage2), 0, 0, paramQDRect.getBytes(), 0);
/*     */       }
/*     */
/*     */     }
/* 413 */     else if ((paramEncodedImage1 instanceof RawEncodedImage)) {
/* 414 */       if ((paramEncodedImage2 instanceof ByteEncodedImage)) {
/* 415 */         i = TrimImage(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage1), 0, 0, ((ByteEncodedImage)paramEncodedImage2).getBytes(), 0, 0, paramQDRect.getBytes(), 0);
/*     */       }
/* 424 */       else if ((paramEncodedImage2 instanceof IntEncodedImage)) {
/* 425 */         i = TrimImage(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage1), 0, 0, ((IntEncodedImage)paramEncodedImage2).getInts(), 0, 0, paramQDRect.getBytes(), 0);
/*     */       }
/* 434 */       else if ((paramEncodedImage2 instanceof RawEncodedImage)) {
/* 435 */         i = TrimImage(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage1), 0, 0, QTObject.ID((RawEncodedImage)paramEncodedImage2), 0, 0, paramQDRect.getBytes(), 0);
/*     */       }
/*     */
/*     */     }
/*     */
/* 445 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public static final void decompress(EncodedImage paramEncodedImage, ImageDescription paramImageDescription, QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt)
/*     */     throws StdQTException, QDException
/*     */   {
/* 462 */     decompress(paramEncodedImage, paramImageDescription, paramQDGraphics, null, paramQDRect, paramInt, null);
/*     */   }
/*     */
/*     */   public static final void decompress(EncodedImage paramEncodedImage, ImageDescription paramImageDescription, QDGraphics paramQDGraphics, QDRect paramQDRect1, QDRect paramQDRect2, int paramInt, Region paramRegion)
/*     */     throws StdQTException, QDException
/*     */   {
/* 484 */     if (paramQDGraphics == null) {
/* 485 */       throw new StdQTException(-50);
/*     */     }
/* 487 */     int i = -50;
/* 488 */     synchronized (QTNative.globalsLock) {
/* 489 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 490 */         GetGWorld(savedPort, savedDevice);
/* 491 */       SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 492 */       if ((paramEncodedImage instanceof ByteEncodedImage)) {
/* 493 */         i = DecompressImage(((ByteEncodedImage)paramEncodedImage).getBytes(), QTObject.ID(paramImageDescription), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect1 == null ? null : paramQDRect1.getRect(), paramQDRect2.getRect(), (short)paramInt, QTObject.ID(paramRegion));
/*     */       }
/* 500 */       else if ((paramEncodedImage instanceof IntEncodedImage)) {
/* 501 */         i = DecompressImage(((IntEncodedImage)paramEncodedImage).getInts(), QTObject.ID(paramImageDescription), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect1 == null ? null : paramQDRect1.getRect(), paramQDRect2.getRect(), (short)paramInt, QTObject.ID(paramRegion));
/*     */       }
/* 508 */       else if ((paramEncodedImage instanceof RawEncodedImage)) {
/* 509 */         i = DecompressImage(QTObject.ID((RawEncodedImage)paramEncodedImage), QTObject.ID(paramImageDescription), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect1 == null ? null : paramQDRect1.getRect(), paramQDRect2.getRect(), (short)paramInt, QTObject.ID(paramRegion));
/*     */       }
/*     */
/* 516 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 517 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */     }
/* 519 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public static final void fDecompress(EncodedImage paramEncodedImage, ImageDescription paramImageDescription, QDGraphics paramQDGraphics, QDRect paramQDRect1, Matrix paramMatrix, int paramInt1, Region paramRegion, PixMap paramPixMap, QDRect paramQDRect2, int paramInt2, CodecComponent paramCodecComponent)
/*     */     throws StdQTException, QDException
/*     */   {
/* 551 */     if (paramQDGraphics == null) {
/* 552 */       throw new StdQTException(-50);
/*     */     }
/* 554 */     int i = 0;
/* 555 */     synchronized (QTNative.globalsLock) {
/* 556 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 557 */         GetGWorld(savedPort, savedDevice);
/* 558 */       SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 559 */       i = FDecompressImage(QTObject.ID((RawEncodedImage)paramEncodedImage), QTObject.ID(paramImageDescription), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect1 == null ? null : paramQDRect1.getRect(), paramMatrix == null ? null : paramMatrix.getBytes(), (short)paramInt1, QTObject.ID(paramRegion), QTObject.ID(paramPixMap), paramQDRect2 == null ? null : paramQDRect2.getRect(), paramInt2, QTObject.ID(paramCodecComponent), 0, 0, 0);
/*     */
/* 571 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 572 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */     }
/* 574 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public static final int getMaxCompressionSize(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, int paramInt3, CodecComponent paramCodecComponent)
/*     */     throws StdQTException, QDException
/*     */   {
/* 597 */     int[] arrayOfInt = new int[1];
/* 598 */     if (paramQDGraphics == null) {
/* 599 */       throw new StdQTException(-50);
/*     */     }
/* 601 */     int i = 0;
/*     */
/* 603 */     synchronized (QTNative.globalsLock) {
/* 604 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 605 */         GetGWorld(savedPort, savedDevice);
/* 606 */       SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 607 */       i = GetMaxCompressionSize(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect == null ? null : paramQDRect.getRect(), (short)paramInt1, paramInt2, paramInt3, QTObject.ID(paramCodecComponent), arrayOfInt);
/*     */
/* 614 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 615 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */     }
/* 617 */     StdQTException.checkError(i);
/* 618 */     return arrayOfInt[0];
/*     */   }
/*     */
/*     */   public static final int getCompressedSize(ImageDescription paramImageDescription, EncodedImage paramEncodedImage)
/*     */     throws StdQTException
/*     */   {
/* 629 */     int[] arrayOfInt = new int[1];
/* 630 */     int i = -50;
/* 631 */     if ((paramEncodedImage instanceof ByteEncodedImage)) {
/* 632 */       i = GetCompressedImageSize(QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage).getBytes(), 0, 0, arrayOfInt);
/*     */     }
/* 637 */     else if ((paramEncodedImage instanceof IntEncodedImage)) {
/* 638 */       i = GetCompressedImageSize(QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage).getInts(), 0, 0, arrayOfInt);
/*     */     }
/* 643 */     else if ((paramEncodedImage instanceof RawEncodedImage)) {
/* 644 */       i = GetCompressedImageSize(QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage), 0, 0, arrayOfInt);
/*     */     }
/*     */
/* 649 */     StdQTException.checkError(i);
/* 650 */     return arrayOfInt[0];
/*     */   }
/*     */
/*     */   public static final int getCompressionTime(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, CodecComponent paramCodecComponent, int paramInt3, int paramInt4)
/*     */     throws StdQTException, QDException
/*     */   {
/* 674 */     int[] arrayOfInt = new int[1];
/*     */
/* 676 */     int i = 0;
/* 677 */     int j = 0;
/* 678 */     synchronized (QTNative.globalsLock) {
/* 679 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 680 */         GetGWorld(savedPort, savedDevice);
/* 681 */       if (paramQDGraphics != null) {
/* 682 */         SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 683 */         i = QTObject.ID(paramQDGraphics.getPixMap());
/*     */       }
/* 685 */       j = GetCompressionTime(i, paramQDRect == null ? null : paramQDRect.getRect(), (short)paramInt1, paramInt2, QTObject.ID(paramCodecComponent), paramInt3, paramInt4, arrayOfInt);
/*     */
/* 693 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 694 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */       }
/*     */     }
/* 697 */     StdQTException.checkError(j);
/* 698 */     return arrayOfInt[0];
/*     */   }
/*     */
/*     */   public static final float getSimilarity(QDGraphics paramQDGraphics, QDRect paramQDRect, ImageDescription paramImageDescription, EncodedImage paramEncodedImage)
/*     */     throws StdQTException, QDException
/*     */   {
/* 717 */     int[] arrayOfInt = new int[1];
/* 718 */     if (paramQDGraphics == null) {
/* 719 */       throw new StdQTException(-50);
/*     */     }
/* 721 */     int i = -50;
/* 722 */     synchronized (QTNative.globalsLock) {
/* 723 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 724 */         GetGWorld(savedPort, savedDevice);
/* 725 */       SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 726 */       if ((paramEncodedImage instanceof ByteEncodedImage)) {
/* 727 */         i = GetSimilarity(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), QTObject.ID(paramImageDescription), ((ByteEncodedImage)paramEncodedImage).getBytes(), arrayOfInt);
/*     */       }
/* 732 */       else if ((paramEncodedImage instanceof IntEncodedImage)) {
/* 733 */         i = GetSimilarity(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getBytes(), QTObject.ID(paramImageDescription), ((IntEncodedImage)paramEncodedImage).getInts(), arrayOfInt);
/*     */       }
/* 738 */       else if ((paramEncodedImage instanceof RawEncodedImage)) {
/* 739 */         i = GetSimilarity(QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getBytes(), QTObject.ID(paramImageDescription), QTObject.ID((RawEncodedImage)paramEncodedImage), arrayOfInt);
/*     */       }
/*     */
/* 744 */       if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 745 */         SetGWorld(savedPort[0], savedDevice[0]);
/*     */     }
/* 747 */     StdQTException.checkError(i);
/* 748 */     return QTUtils.Fix2X(arrayOfInt[0]);
/*     */   }
/*     */
/*     */   private static native void GetGWorld(int[] paramArrayOfInt1, int[] paramArrayOfInt2);
/*     */
/*     */   private static native void SetGWorld(int paramInt1, int paramInt2);
/*     */
/*     */   private static native short CompressImage(int paramInt1, byte[] paramArrayOfByte, int paramInt2, int paramInt3, int paramInt4, int paramInt5);
/*     */
/*     */   private static native short CompressImage(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, int paramInt4, byte[] paramArrayOfByte2);
/*     */
/*     */   private static native short CompressImage(int paramInt1, byte[] paramArrayOfByte, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt);
/*     */
/*     */   private static native short FCompressImage(int paramInt1, byte[] paramArrayOfByte, short paramShort1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, short paramShort2, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10);
/*     */
/*     */   private static native short FCompressImage(int paramInt1, byte[] paramArrayOfByte1, short paramShort1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, short paramShort2, int paramInt6, int paramInt7, int paramInt8, int paramInt9, byte[] paramArrayOfByte2);
/*     */
/*     */   private static native short FCompressImage(int paramInt1, byte[] paramArrayOfByte, short paramShort1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, short paramShort2, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int[] paramArrayOfInt);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, byte[] paramArrayOfByte1, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, byte[] paramArrayOfByte2);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, byte[] paramArrayOfByte, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int[] paramArrayOfInt);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, byte[] paramArrayOfByte, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, int[] paramArrayOfInt, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, byte[] paramArrayOfByte);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, int[] paramArrayOfInt1, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int[] paramArrayOfInt2);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, int[] paramArrayOfInt, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, int paramInt2, short paramShort, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, byte[] paramArrayOfByte);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, int paramInt2, short paramShort, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int[] paramArrayOfInt);
/*     */
/*     */   private static native short ConvertImage(int paramInt1, int paramInt2, short paramShort, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, int paramInt9);
/*     */
/*     */   private static native short TrimImage(int paramInt1, int paramInt2, int paramInt3, int paramInt4, byte[] paramArrayOfByte1, int paramInt5, int paramInt6, byte[] paramArrayOfByte2, int paramInt7);
/*     */
/*     */   private static native short TrimImage(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt, int paramInt5, int paramInt6, byte[] paramArrayOfByte, int paramInt7);
/*     */
/*     */   private static native short TrimImage(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, byte[] paramArrayOfByte, int paramInt8);
/*     */
/*     */   private static native short TrimImage(int paramInt1, int[] paramArrayOfInt, int paramInt2, int paramInt3, byte[] paramArrayOfByte1, int paramInt4, int paramInt5, byte[] paramArrayOfByte2, int paramInt6);
/*     */
/*     */   private static native short TrimImage(int paramInt1, int[] paramArrayOfInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt2, int paramInt4, int paramInt5, byte[] paramArrayOfByte, int paramInt6);
/*     */
/*     */   private static native short TrimImage(int paramInt1, int[] paramArrayOfInt, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, byte[] paramArrayOfByte, int paramInt7);
/*     */
/*     */   private static native short TrimImage(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, byte[] paramArrayOfByte2, int paramInt4, int paramInt5, byte[] paramArrayOfByte3, int paramInt6);
/*     */
/*     */   private static native short TrimImage(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4, int paramInt5, byte[] paramArrayOfByte2, int paramInt6);
/*     */
/*     */   private static native short TrimImage(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6, byte[] paramArrayOfByte2, int paramInt7);
/*     */
/*     */   private static native short DecompressImage(byte[] paramArrayOfByte1, int paramInt1, int paramInt2, byte[] paramArrayOfByte2, byte[] paramArrayOfByte3, short paramShort, int paramInt3);
/*     */
/*     */   private static native short DecompressImage(int[] paramArrayOfInt, int paramInt1, int paramInt2, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, short paramShort, int paramInt3);
/*     */
/*     */   private static native short DecompressImage(int paramInt1, int paramInt2, int paramInt3, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, short paramShort, int paramInt4);
/*     */
/*     */   private static native short FDecompressImage(int paramInt1, int paramInt2, int paramInt3, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, short paramShort, int paramInt4, int paramInt5, byte[] paramArrayOfByte3, int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10);
/*     */
/*     */   private static native short GetMaxCompressionSize(int paramInt1, byte[] paramArrayOfByte, short paramShort, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt);
/*     */
/*     */   private static native short GetCompressedImageSize(int paramInt1, byte[] paramArrayOfByte, int paramInt2, int paramInt3, int[] paramArrayOfInt);
/*     */
/*     */   private static native short GetCompressedImageSize(int paramInt1, int[] paramArrayOfInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt2);
/*     */
/*     */   private static native short GetCompressedImageSize(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt);
/*     */
/*     */   private static native short GetCompressionTime(int paramInt1, byte[] paramArrayOfByte, short paramShort, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int[] paramArrayOfInt);
/*     */
/*     */   private static native short GetSimilarity(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, byte[] paramArrayOfByte2, int[] paramArrayOfInt);
/*     */
/*     */   private static native short GetSimilarity(int paramInt1, byte[] paramArrayOfByte, int paramInt2, int[] paramArrayOfInt1, int[] paramArrayOfInt2);
/*     */
/*     */   private static native short GetSimilarity(int paramInt1, byte[] paramArrayOfByte, int paramInt2, int paramInt3, int[] paramArrayOfInt);
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.std.image.QTImage
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.std.image.QTImage

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.