Hi,

Could some kind soul give me a nudge with regards to the
ImagePyramidReader? I have a pyramid already constructed but I want to
be able to retrieve a scaled image, not just the full-size. The brief
code I am using is:

ImagePyramidReader reader = new ImagePyramidReader(new File(PYRAMID_PATH));
GridCoverage2D grid = (GridCoverage2D)reader.read(null);
ImageIO.write(grid.getRenderedImage(), "PNG",
    new File("/home/pyramid-test/pyramid_out.png"));

This results in a full-sized rendering of the pyramid. How do I
configure it to render something at 50% (for example)?

I am guessing that I need to feed GeneralParameterValues to
reader.read(...) but after looking through the javadocs and the
examples I am just not coming up with the solution.

Any assistance would be greatly appreciated, and I would be glad to
add the resulting snippet to the examples section of the site.

Thanks,

Kevin

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to