Do we have to write out a file or can we compare buffered images in memory?

On Sunday, April 27, 2014, Andrea Aime <andrea.a...@geo-solutions.it> wrote:

> Hi,
> under OpenJDK7 I'm seeing this build failure:
>
>
> -------------------------------------------------------------------------------
> Test set: org.geotools.image.ImageWorkerTest
>
> -------------------------------------------------------------------------------
> Tests run: 22, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.276 sec
> <<< FAILURE! - in org.geotools.image.ImageWorkerTest
> testJPEGWrite(org.geotools.image.ImageWorkerTest)  Time elapsed: 0.042 sec
>  <<< ERROR!
> javax.imageio.IIOException: Unsupported marker type 0xf7
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native
> Method)
>  at
> com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:604)
> at
> com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImageReader.java:342)
>  at
> com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReader.java:476)
> at
> com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:597)
>  at
> com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1054)
> at
> com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1034)
>  at javax.imageio.ImageIO.read(ImageIO.java:1448)
> at javax.imageio.ImageIO.read(ImageIO.java:1308)
> at
> org.geotools.image.ImageWorkerTest.testJPEGWrite(ImageWorkerTest.java:360)
>
> Now... it seems to be a write related failure, if I put a breakpoint right
> after
>    worker.writeJPEG(outFile, "JPEG-LS", 0.75f, true);
> and look for outFile, indeed nothing seems to be able to open it (file
> output.jpeg, attached)
>
> Now... the issue seems to be related to the OpenJDK 7 + JAI native libs
> installed togheter.
>
> If I run JDK 6 + native JAI the test passes, but the test file cannot,
> again, be opened by
> anything (besides the JDK itself, that is). Sample attached,
> output-jdk6.jpeg  (hint,
> the output.jpeg and output-jdk6.jpeg files are identical, it just seems
> that JDK 7
> is not able to read back the crap it's writing out).
>
> When native JAI is not available the test passes but... it's writing out
> the same unreadable
> file, but the test passes because the code is no trying to read it back!
> :-p
> Long story short, it seems calling:
>
>    worker.writeJPEG(outFile, "JPEG-LS", 0.75f, true);
>
> never actually generates a valid JPEG file?
>
> Cheers
> Andrea
>
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
> for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>


-- 
Jody Garnett
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to