There is a section in the docs for rendering to a buffered image (incase
you don't want the whole image):
http://docs.geotools.org/latest/userguide/library/render/gtrenderer.html#image
On Fri Dec 05 2014 at 4:57:57 AM Mark Prins <mc.pr...@gmail.com> wrote:
> 2014-12-04 22:24 GMT+01:00 Gabriella Turek <gabriella.tu...@niwa.co.nz>:
>
>> Thanx for the tip Andrea. That didn't work but this did, debugging I
>> saw that what being returned was a RenderedOp
>>
>>
>> RenderedOp ri = (RenderedOp)gc.getRenderedImage();
>> sourceBufferedImage = ri.getAsBufferedImage();
>>
>>
>> Now I figured that I could do the same for getting the BufferedImage
>> for a tif image, but no, it does not. Even though the
>>
>> the instance returned is also a RenderedOp, I run into trouble when
>> trying to render the image:
>>
>>
>> Exception in thread "AWT-EventQueue-0"
>> java.lang.ArrayIndexOutOfBoundsException: -2147385344
>>
> this number is pretty close to the maximum size of an array... guessing
> (not having looked at any code) this imagedata is being stored in an array
> (with an int index, eg. byte[]) which is just too large; maximum int size
> is somewhere near 2^31
>
> --
> Disclaimer;
> This message is just a reflection of what I thought at the time of
> sending. The message may contain information that is not intended for you
> or that you don't understand.
> ------------------------------------------------------------
> ------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&
> iu=/4140/ostg.clktrk_______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users