/* */ try
/* */ {
/* 666 */ at.preConcatenate(scale.createInverse());
/* */ } catch (Exception e) {
/* 668 */ String message = JaiI18N.getString("IIPCRIF6");
/* 669 */ listener.errorOccurred(message, new ImagingException(message, e), this, false);
/* */ }
/* */
/* 677 */ AffineTransform afn = (AffineTransform)paramBlock.getObjectParameter(6);
/* */ try
/* */ {
/* 680 */ afn.preConcatenate(at.createInverse());
/* */ } catch (Exception e) {
/* 682 */ String message = JaiI18N.getString("IIPCRIF6");
/* 683 */ listener.errorOccurred(message, new ImagingException(message, e), this, false);
/* */ }
/* */
/* 689 */ if (isFull)
/* */ {
/* 692 */ buf.append("&WID=" + dstROI.width + "&HEI=" + dstROI.height);
/* */ }
/* */
/* 729 */ double[] matrix = new double[6];
/* 730 */ afn.getMatrix(matrix);
/* 731 */ buf.append("&AFN=" + matrix[0] + "," + matrix[2] + ",0," + matrix[4] + "," + matrix[1] + "," + matrix[3] + ",0," + matrix[5] + ",0,0,1,0,0,0,0,1");
/* */
/* 737 */ if ((opMask & 0x20) != 0) {
/* 738 */ buf.append("&RAR=" + paramBlock.getFloatParameter(7));
/* */ }
/* */
/* 742 */ if ((opMask & 0x40) != 0) {
/* 743 */ Rectangle2D dstRGN = (Rectangle2D)paramBlock.getObjectParameter(8);
/* */
/* 745 */ buf.append("&RGN=" + dstRGN.getX() + "," + dstRGN.getY() + "," + dstRGN.getWidth() + "," + dstRGN.getHeight());
/* */ }
/* */
/* 750 */ if ((isFull) && (
/* 751 */ ((opMask & 0x80) != 0) || ((opMask & 0x100) != 0)))
/* */ {
/* 753 */ buf.append("&RFM=" + paramBlock.getIntParameter(9));
/* 754 */ if ((opMask & 0x100) != 0) {
/* 755 */ String axis = (String)paramBlock.getObjectParameter(10);
/* 756 */ if (axis.equalsIgnoreCase("x"))
/* 757 */ buf.append(",0");
/* */ else {
/* 759 */ buf.append(",90");
/* */ }
/* */
/* */ }
/* */
/* */ }
/* */
/* 766 */ if (((opMask & 0x200) == 0) ||
/* 774 */ (isJPEG)) {
/* 775 */ if ((opMask & 0x400) != 0) {
/* 776 */ buf.append("&QLT=" + paramBlock.getIntParameter(12));
/* */ }
/* */
/* 779 */ if ((opMask & 0x800) != 0) {
/* 780 */ buf.append("&CIN=" + paramBlock.getIntParameter(13));
/* */ }
/* */
/* */ }
/* */
/* 785 */ String format = isJPEG ? "JPEG" : "FPX";
/* */
/* 788 */ buf.append("&CVT=" + format);
/* */
/* 792 */ InputStream stream = null;
/* 793 */ RenderedImage rendering = null;
/* */ try {
/* 795 */ URL url = new URL(buf.toString());
/* 796 */ stream = url.openStream();
/* 797 */ MemoryCacheSeekableStream sStream = new MemoryCacheSeekableStream(stream);
/* */
/* 799 */ rendering = JAI.create(format, sStream);
/* */ } catch (Exception e) {
/* 801 */ String message = JaiI18N.getString("IIPCRIF7") + " " + buf.toString();
/* */
/* 803 */ listener.errorOccurred(message, new ImagingException(message, e), this, false);
/* */ }
/* */
/* 810 */ if (!isFull) {
/* 811 */ postTransform.scale(dstROI.getWidth() / rendering.getWidth(), dstROI.getHeight() / rendering.getHeight());
/* */ }