Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio

From:Harald Kuhr [harald.kuhr@masked-domain]
Sent on:Thu, 27 Mar 2008 21:17:22 +0100
In reply to:Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio sent on Wed, 26 Mar 2008 11:47:37 -0500 (CDT) by Bob Friesenhahn [bfriesen@masked-domain]

On 26. mar. 2008, at 17.47, Bob Friesenhahn wrote:
> An approach would be to re-implement ImageMagick "pixel cache" storage
> in Java. ImageMagick would then invoke a callback to "persist" any
> pixels which are read in a native Java image. When writing,
> ImageMagick would invoke a callback to retrieve the pixels to write.
> While processing an image, ImageMagick would use the same callbacks to
> retrieve and store pixels. Since Java would need to copy the pixels,
> there would be some added overhead.
>
> There is already a "pixel stream" interface in ImageMagick which
> exposes some of this, but unfortunately, it still stores its own
> pixels, which doubles memory requirements.
>
> This approach assumes that the images are not too large for Java to be
> able to allocate memory for them.

I'm currently using the MagickImage.dispatchImage method from
JMagick, to get the raw pixel data to Java (in a format compatible
with the BufferedImage types). I then create a data buffer "around"
that array, and create a BuffereImage directly from it.

This approach has a more than okay performance for my needs, but it
does of course need memory for the pixel data in both native and Java
sides. And it could probably be done faster, especially if it would
be possible to hook directly into the memory of ImageMagick, or have
ImageMagick write directly to Java memory. Don't know enough about
the internal workings of ImageMagick to help with any ot that though...


Regards,

--
Harald K
_______________________________________________
JMagick mailing list
[JMagick@masked-domain]
http://www.yeo.id.au/mailman/listinfo/jmagick
Please ensure that [JMagick@masked-domain] is a recipient when replying.
Found what you were looking for? If not - continue at Wiki Index

Other messages in this topic

SenderDate sentSubject
Harald Kuhr [harald.kuhr@masked-domain]Thu, 27 Mar 2008 20:47:21 +0100Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio
Bob Friesenhahn [bfriesen@masked-domain]Wed, 26 Mar 2008 11:47:37 -0500 (CDT)Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio
"Simone Giannecchini" [simboss1@masked-domain]Wed, 26 Mar 2008 16:51:46 +0100Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio
"Jacob Nordfalk" [jacob.nordfalk@masked-domain]Wed, 26 Mar 2008 10:48:13 +0545Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio
"Simone Giannecchini" [simboss1@masked-domain]Tue, 25 Mar 2008 16:26:23 +0100Re: [Jmagick] [JAI-IMAGEIO] Google summer of code and imageio
Bob Friesenhahn [bfriesen@masked-domain]Wed, 12 Mar 2008 18:14:28 -0500 (CDT)Re: [Jmagick] Google summer of code and imageio
Bob Friesenhahn [bfriesen@masked-domain]Wed, 12 Mar 2008 18:09:39 -0500 (CDT)Re: [Jmagick] Google summer of code and imageio
"Simone Giannecchini" [simboss1@masked-domain]Wed, 12 Mar 2008 22:56:39 +0100Re: [Jmagick] Google summer of code and imageio
"Simone Giannecchini" [simboss1@masked-domain]Wed, 12 Mar 2008 23:01:40 +0100Re: [Jmagick] Google summer of code and imageio
Bob Friesenhahn [bfriesen@masked-domain]Wed, 12 Mar 2008 10:40:38 -0500 (CDT)Re: [Jmagick] Google summer of code and imageio
"Simone Giannecchini" [simboss1@masked-domain]Wed, 12 Mar 2008 09:15:44 +0100[Jmagick] Google summer of code and imageio
"Jacob Nordfalk" [jacob.nordfalk@masked-domain]Wed, 12 Mar 2008 11:55:52 +0545Re: [Jmagick] Google summer of code and imageio
"Simone Giannecchini" [simboss1@masked-domain]Wed, 12 Mar 2008 03:51:13 +0100[Jmagick] Google summer of code and imageio

 
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources
FitNesse Resources