Multithreaded Ghostscript Delegate/Error handling with libjpeg
Olaf Groeger <[email protected]> Tue, 13 Jun 2006 22:14:47 +0200
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hello Bob, i'm currently writing a jni interface as replacement for jmagick, so that i can use graphicsmagick inside an eclipse plugin. First of all i want to thank you for your great work. GraphicsMagick rules! I found two problems: 1) It seems that Ghostscript is not multithreaded. If i call image.read() from several threads i have not problem as long as i don't want to read files which use Ghostscript. I found that this problem is known in ImageMagick: http://redux.imagemagick.org/discussion-server/viewtopic.php?t=5785& In this thread a patch is announced for ImageMagick. Would it be possible to do the same in GraphicsMagick? 2) Errors from libjpeg are not safely caught. I resized an image while keeping the aspect ratio. This lead to an Image which had not height (the original was 500x1 px, i resized to 100x100). ok, that's my fault. But if you try to safe this image as jpeg, libjpeg prints the error message "Empty JPEG image (DNL not supported)" to stderr and terminates the process. The behaviour of libjpeg is somehow correct (the jpeg has not height, so its is empty), but a termination of the application is overkill. This problem is known in ImageMagick: http://studio.imagemagick.org/pipermail/magick-developers/2005-October/002384.html In this mailing ImageMagick announces a fix to catch this error from libjpeg. Could you catch this error in GraphicsMagick, too? Greetings from Germany Olaf Groeger I forgot: I use GraphicsMagick 1.1.7 and WinXP