-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
convert fails to allocate memory when opening a gimp 2.10 xcf image #1133
Comments
I did the following. Took the lena.png image and opened in GIMP 2.8.20 and saved to lena.xcf. I then tested with IM 7.0.7.32 Q16 HDRI Mac OSX Sierra and it works fine.
But it fails in IM 6.9.9.44 Q16 Mac OSX Sierra
convert: NotEnoughPixelData I get the same results as above using IM 7.0.7.33 Q16 HDRI Mac OSX Sierra and IM 6.9.9.45 Q16 Mac OSX Sierra. |
I believe the issue results from xcf images saved with the new version of GIMP (2.10). I have converted images using imagemagick made with GIMP 2.8.x in the past without issue. I can provide a test image made with GIMP 2.10 if that would be helpful. |
That does not explain the fact that the conversion fails for me on IM 6, but works for IM 7. Your issue may be a completely different one and also valid. Your issue sounds like it could be an xcf format change. |
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow. Post a URL to a XCF image file from Gimp 2.10. We're still running 2.8. |
It looks like the XCF format has changed for Gimp 2.10. If this is documented somewhere (version 11), post the link here. We'll need to patch the XCF coder to account for these changes. Even Gimp 2.8 cannot read test.xcf. |
I believe that this is what you're looking for: https://git.gnome.org/browse/gimp/tree/devel-docs/xcf.txt though afaict it doesn't spell out the differences between versions. If this isn't helpful, please let me know and I will keeping digging for more information. |
Hello, $ convert -compress JPEG 201712.xcf 201712.pdf
convert: memory allocation failed `201712.xcf' @ error/xcf.c/ReadXCFImage/1341.
convert: no images defined `201712.pdf' @ error/convert.c/ConvertImageCommand/3275.
make: *** [Makefile:4: 201712.pdf] Error 1 I also thought about some difference with Gimp 2.10, so I opened a file produced by Gimp 2.8, and save it again. But convert could process it just fine. Do you confirm it's the same bug or should I open another issue? $ convert -version
Version: ImageMagick 7.0.7-39 Q16 x86_64 2018-06-11 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raw rsvg tiff webp wmf x xml zlib |
A relevant change might be the pointer size changing from 4 bytes to 8 in XCF 11. From https://gitlab.gnome.org/GNOME/gimp/blob/master/devel-docs/xcf.txt
|
It's incredible how this work of you guys is important. I was trying to convert my XCF files to PNG yesterday in a random site and an error ocurred, and now I'm here. Thank you for this project, and I hope this get fixed soon. |
Is there any progress on it? On ubuntu 18.10:
|
@v1993 I added the up for grabs label so someone can help us add support for this. |
Prerequisites
Description
It seems that either recent imagemagick or recent gimp updates leave the former unable to convert images from the latter. When trying to convert an xcf image to png or jpeg imagemagick crashes with a cannot allocate memory error.
Steps to Reproduce
magick test.xcf test.png
Provides the following stacktrace
System Configuration
$ uname -a Linux stig 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: