Obtaining a BufferedImage for printing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Obtaining a BufferedImage for printing

Martin Hegedus
In the past version of JOGL I used Screenshot to get a BufferedImage that I would then pass to graphics.drawImage(...) for printing.  However, in the latest version of JOGL, Screenshot has been deprecated.  Does anyone know the process of obtaining a BufferedImage (or another format) from one of the methods of GLReadBufferUtil, or another class method, so it can be used to print to a printer with the Graphics class?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Obtaining a BufferedImage for printing

Sven Gothel
Administrator
On 04/26/2013 11:43 PM, Martin Hegedus [via jogamp] wrote:
> In the past version of JOGL I used Screenshot to get a BufferedImage that I
> would then pass to graphics.drawImage(...) for printing.  However, in the
> latest version of JOGL, Screenshot has been deprecated.  Does anyone know the
> process of obtaining a BufferedImage (or another format) from one of the
> methods of GLReadBufferUtil,

http://jogamp.org/git/?p=jogl.git;a=commit;h=587ec1437ed762ed8cdfcbf27f940ab83813f4a5
http://jogamp.org/git/?p=jogl.git;a=commit;h=4d35eaa766071fd8dedab8b6e2ee53710831c567

Added abstraction supporting a custom PixelBufferProvider,
used in GLReadBufferUtil.

Thx to your request, this also lead to complete GLContext* in regards
to the default format/type.

+++

Long abstraction, short user impact: You may use AWTGLReadBufferUtil,
see last commit 4d35eaa766071fd8dedab8b6e2ee53710831c567.

~Sven



signature.asc (911 bytes) Download Attachment