GeoServer

Metatling + JPEG -> broken output

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.0-RC1
  • Fix Version/s: 1.7.7, 2.0-RC2, 2.0.x
  • Component/s: WMS
  • Labels:
    None
  • Number of attachments :
    1

Description

Open a map preview, open the preview options, enabled tiling and switch to jpeg format. Look at the result.

Issue Links

Activity

Hide
Andrea Aime added a comment -

The screenshot shows that for each meta tile only one of the output elements is visible. My wild guess is that the JAI slicing code is changing the origins of each tile in the meta tile to create it without actually creating a new image, and the jpeg encoder is not aware of it, and it's probably using some sort of direct access.
Shall we go back to the old code that used to build separete BufferedImage objects as tiles?

Show
Andrea Aime added a comment - The screenshot shows that for each meta tile only one of the output elements is visible. My wild guess is that the JAI slicing code is changing the origins of each tile in the meta tile to create it without actually creating a new image, and the jpeg encoder is not aware of it, and it's probably using some sort of direct access. Shall we go back to the old code that used to build separete BufferedImage objects as tiles?
Hide
Andrea Aime added a comment -

Simbos, it seems that wit native jai around the following exception occurrs:

29 lug 19:14:52 WARN [geoserver.ows] - 
java.lang.NullPointerException
	at com.sun.media.jai.mlib.MediaLibAccessor.findCompatibleTag(MediaLibAccessor.java:537)
	at com.sun.media.jai.mlib.MlibBandSelectOpImage.computeRect(MlibBandSelectOpImage.java:88)
	at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:969)
	at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
	at javax.media.jai.OpImage.getTile(OpImage.java:1129)
	at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
	at com.sun.media.imageioimpl.plugins.clib.CLibImageWriter.getContiguousData(CLibImageWriter.java:272)
	at com.sun.media.imageioimpl.plugins.clib.CLibImageWriter.getMediaLibImage(CLibImageWriter.java:712)
	at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriter.write(CLibJPEGImageWriter.java:240)
	at org.geotools.image.ImageWorker.writeJPEG(ImageWorker.java:2132)
	at org.vfny.geoserver.wms.responses.map.jpeg.JPEGMapProducer.formatImageOutputStream(JPEGMapProducer.java:69)

Sigh?

Show
Andrea Aime added a comment - Simbos, it seems that wit native jai around the following exception occurrs:
29 lug 19:14:52 WARN [geoserver.ows] - 
java.lang.NullPointerException
	at com.sun.media.jai.mlib.MediaLibAccessor.findCompatibleTag(MediaLibAccessor.java:537)
	at com.sun.media.jai.mlib.MlibBandSelectOpImage.computeRect(MlibBandSelectOpImage.java:88)
	at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:969)
	at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
	at javax.media.jai.OpImage.getTile(OpImage.java:1129)
	at javax.media.jai.RenderedOp.getTile(RenderedOp.java:2257)
	at com.sun.media.imageioimpl.plugins.clib.CLibImageWriter.getContiguousData(CLibImageWriter.java:272)
	at com.sun.media.imageioimpl.plugins.clib.CLibImageWriter.getMediaLibImage(CLibImageWriter.java:712)
	at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriter.write(CLibJPEGImageWriter.java:240)
	at org.geotools.image.ImageWorker.writeJPEG(ImageWorker.java:2132)
	at org.vfny.geoserver.wms.responses.map.jpeg.JPEGMapProducer.formatImageOutputStream(JPEGMapProducer.java:69)
Sigh?
Hide
Andrea Aime added a comment -

Mumble, yet this is happening only on GS 1.6, with 1.7 and the same jdk it seems to be fine...

Show
Andrea Aime added a comment - Mumble, yet this is happening only on GS 1.6, with 1.7 and the same jdk it seems to be fine...
Hide
Simone Giannecchini added a comment -

I applied the fix only on gs-1.7.x

Show
Simone Giannecchini added a comment - I applied the fix only on gs-1.7.x
Hide
Andrea Aime added a comment -

I am back and forward porting it... but yeah, I can just forward port it

Show
Andrea Aime added a comment - I am back and forward porting it... but yeah, I can just forward port it
Hide
Andrea Aime added a comment -

Fixed on 1.7.x and trunk

Show
Andrea Aime added a comment - Fixed on 1.7.x and trunk
Hide
Simone Giannecchini added a comment -

noticed that same thing seems to apply to the imagewriter that comes with jdk

Show
Simone Giannecchini added a comment - noticed that same thing seems to apply to the imagewriter that comes with jdk
Hide
Simone Giannecchini added a comment -

committed on trunk

Show
Simone Giannecchini added a comment - committed on trunk
Hide
Andrea Aime added a comment -

Simone, you've committed some debugging code that woudl write images in your user home directory. Please remove it? (eventually along the other commented out code?)

Show
Andrea Aime added a comment - Simone, you've committed some debugging code that woudl write images in your user home directory. Please remove it? (eventually along the other commented out code?)
Hide
Simone Giannecchini added a comment -

sure thing

Show
Simone Giannecchini added a comment - sure thing
Hide
Simone Giannecchini added a comment -

fix is in

Show
Simone Giannecchini added a comment - fix is in

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: