Re: Issue with GM through JNI

Tianyu Lang <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CABR2W48m6TZ4grf8CUAkcvXigNYWAXgciA5_oXkdcgg7HBOY=w@mail.gmail.com>
Hi Bob,

I have another question regarding MagickWriteImageBlob. In our scenario, we
get the original image blob through MagickWriteImageBlob then use the copy
of the blob to generate different versions (different sizes, formats, etc).
Here is some pseudo code:

originalBlob = MagickWriteImageBlob(originalImage)
for variant in variants:
   varaintImage = MagickRedImageBlob(originalBlob)
   // resize and upload to storage

However, we noticed MagickWriteImageBlob is taking almost a second. We
tracked down the function that is being slow and found out the code flow is
as follows:
`MagickWriteImageBlob` -> `ImageToBlob` -> 'WriteImage' -> 'png_write_row'

Just to reaffirm our intuition, does MagickWriteImageBlob use WritePNGImage
in order to normalize the raw image?
And is there any particular reason why png_write_row of the libpng library
might be taking almost 800-900ms? If it matters, we are attempting to use
this function in parallel from multiple Java threads.

Thank you,
Tianyu

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.