Author: onkarshinde-guest Date: 2009-05-10 16:18:07 +0000 (Sun, 10 May 2009) New Revision: 8254
Added: trunk/fop/debian/patches/ trunk/fop/debian/patches/01_from_svn_16_bit_alpha_png.patch Modified: trunk/fop/debian/README.Debian trunk/fop/debian/changelog Log: two more bugs fixed. :-) Modified: trunk/fop/debian/README.Debian =================================================================== --- trunk/fop/debian/README.Debian 2009-05-09 04:37:01 UTC (rev 8253) +++ trunk/fop/debian/README.Debian 2009-05-10 16:18:07 UTC (rev 8254) @@ -4,70 +4,6 @@ You can set the environment variable JAVA_OPTS with options that are passed to the java interpreter. -fop is built with Jimi support ------------------------------- - -This version of FOP is built with Jimi support to allow fop to -work with images in your documents. - -As fop is part of the contrib stream of Debian, we can build it -for distribution with libraries that are not in the Debian -system. In this particular case, that is what I did with fop by -compiling it with support for jimi. You will however need to -download jimi from the Sub web site: - -http://java.sun.com/products/jimi/ - -You will need to agree to Sun's licensing terms in order to be -shown a link to a file to download. At the time this was -written, the jimi support was present as both a Zip archive and -as "compressed" tar archive. You will either need Zip tools, or -uncompress and tar to work with this archive. - -The name of the file to download is something like: - -jimi1_0.zip (or jimi1_0.tar.Z) - -Inside that archive is a single jar (java archive, which is a -special kind of zip file) of the name JimiProClasses.zip that you -will need to extract. Put a copy of that jar (zip file) -under /usr/share/java with the name jimi-1.0.jar if you want fop -to work normally with images on Debian. - -If you don't want to put a copy of this jar file -under /usr/share/java/, you can either put a symlink to the real -location of the jar file under /usr/share/java (with the name -jimi-1.0.jar), or you can edit the /usr/bin/fop shell script for -how you would rather have things work. - -UPDATE: -------- - -Massimo Manghi wrote this in bug #354086: - -Sun now releases an archive that carries the whole source files tree for -JIMI and a jar archive named JimiProClasses.zip which is the library -that has to be installed. - -Thanks to him. - -fop is built with JAI support ------------------------------ - -Download JAI (Java Advanced Imaging) at Sun: -http://java.sun.com/products/java-media/jai/ - -(I built with jai-1_1_3-alpha) - -And install the jar files in /usr/share/java (or set your CLASSPATH) and -the .so somewhere in the library path /usr/local/lib or /usr/lib. - -There is no release of the shared lib for GNU/Linux Powerpc so I cannot -test if it actually works. I just can say I did compile it with jai -support. - -Thanks for feedbacks. - fop 0.95.dfsg ------------- Modified: trunk/fop/debian/changelog =================================================================== --- trunk/fop/debian/changelog 2009-05-09 04:37:01 UTC (rev 8253) +++ trunk/fop/debian/changelog 2009-05-10 16:18:07 UTC (rev 8254) @@ -1,3 +1,14 @@ +fop (1:0.95.dfsg-5) unstable; urgency=low + + * debian/patches + - 01_from_svn_16_bit_alpha_png.patch - Change from upstream svn to fix + reading of .png files with 16-bit alpha channel. (Closes: #524883) + * debian/README.Debian + - fop no longer uses/supports JIMI/JAI image processing libraries. Remove + sections from readme that mention JIMI/JAI. (Closes: #523170) + + -- Onkar Shinde <[email protected]> Sun, 10 May 2009 18:18:00 +0530 + fop (1:0.95.dfsg-4) unstable; urgency=low * Recommends libsaxon-java in order to process png files Added: trunk/fop/debian/patches/01_from_svn_16_bit_alpha_png.patch =================================================================== --- trunk/fop/debian/patches/01_from_svn_16_bit_alpha_png.patch (rev 0) +++ trunk/fop/debian/patches/01_from_svn_16_bit_alpha_png.patch 2009-05-10 16:18:07 UTC (rev 8254) @@ -0,0 +1,31 @@ +--- trunk/src/java/org/apache/fop/pdf/AlphaRasterImage.java 2008/07/24 09:35:34 679326 ++++ trunk/src/java/org/apache/fop/pdf/AlphaRasterImage.java 2008/09/17 16:41:14 696365 +@@ -48,6 +48,9 @@ + */ + public AlphaRasterImage(String k, Raster alpha) { + this.key = k; ++ //Enable the commented line below if 16-bit alpha channels are desired. ++ //Otherwise, we compress the alpha channel to 8 bit which should be sufficient. ++ //this.bitsPerComponent = alpha.getSampleModel().getSampleSize(0); + this.bitsPerComponent = 8; + this.colorSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_GRAY); + if (alpha == null) { +@@ -148,6 +151,18 @@ + alpha.getDataElements(0, y, w, 1, line); + out.write(line); + } ++ } else if (dataType == DataBuffer.TYPE_USHORT) { ++ short[] sline = new short[nbands * w]; ++ byte[] line = new byte[nbands * w]; ++ for (int y = 0; y < h; y++) { ++ alpha.getDataElements(0, y, w, 1, sline); ++ for (int i = 0; i < w; i++) { ++ //this compresses a 16-bit alpha channel to 8 bits! ++ //we probably don't ever need a 16-bit channel ++ line[i] = (byte)(sline[i] >> 8); ++ } ++ out.write(line); ++ } + } else if (dataType == DataBuffer.TYPE_INT) { + //Is there an better way to get a 8bit raster from a TYPE_INT raster? + int shift = 24; _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-java-commits

