I am trying to convert an image in EMF format to PNG using Imagemagick on Red Hat Enterprise Linux Server release 5.5 (Tikanga), but I am running into the following error:
convert: no decode delegate for this image format `thumbnail.emf' # error/constitute.c/ReadImage/550.
convert: no images defined `1.png' # error/convert.c/ConvertImageCommand/3068.
How might I fix this?
Install libreoffice and run this command on the folder where your emf files are located:
libreoffice --headless --convert-to png *.emf
Another way is to use inkscape:
inkscape -o file.png source.emf
See inkscape --help for more export options (area to export, dpi, image resolution, background color etc).
According to this page: http://www.imagemagick.org/script/formats.php
EMF R Microsoft Enhanced Metafile (32-bit) Only available under Microsoft Windows.
Related
I recently changed my server to Ubuntu 18.04 and now I have an error with paperclip and imagemagick. File uploads work locally but not on my server. I am running rails 5.2.3 and paperclip 5.2.1 and ImageMagick 7.0.8-56. I added the following line to environments/production.rb:
Paperclip.options[:command_path] = '/usr/local/bin/'
but still get the error. When I run identify -list format to see what files Imagemagick works with, it does not say jpg, which is different than my old server. Here is the partial output:
ICON* rw- Microsoft icon
IIQ r-- Phase One Raw Image Format
INFO -w+ The image format and characteristics
INLINE* rw+ Base64-encoded inline images
IPL* rw+ IPL Image Sequence
ISOBRL* -w- ISO/TR 11548-1 format
ISOBRL6* -w- ISO/TR 11548-1 format 6dot
JNX* r-- Garmin tile format
JSON -w+ The image format and characteristics
K* rw+ Raw black samples
K25 r-- Kodak Digital Camera Raw Image Format
KDC r-- Kodak Digital Camera Raw Image Format
LABEL* r-- Image label
The error I get is Paperclip::Errors::NotIdentifiedByImageMagickError in my production log when I upload an image.
Some files were apparently not installed because I installed imagemagick from source. I had to hard delete the folder with imagemagick in it and reinstall using sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev . Thank you.
I have deployed a PHP application to a new server with more recent version of ImageMagick and PHP, however, the new server (ImageMagick) does a poor job at converting PDF to raster (jpg or png).
Here is the PHP code I run on both servers (with identical input file)
$im = new Imagick();
$im->setResolution( 72, 72 );
$im->readImage( 'vector.pdf' );
$im->setImageFileName('output-old.jpg');
$im->writeImage();
The generated files look like this
Generated file on old server (looks correct)
http://i.stack.imgur.com/owai5.jpg
Generated file on new server (problems)
http://i.stack.imgur.com/xg3kv.jpg
Original PDF
https://drive.google.com/file/d/0B9RgJSi9aRIJcUJYd2Z4bzFDTTA/view?usp=sharing
NOTE: same problem occurs when using ImageMagick via command line
convert vector.pdf output.jpg
Old Server Configuration
PHP: 5.3.10
ImageMagick: 6.7.6-0 2012-03-16 Q16
OS: Ubuntu 12.04
New Server Configuration
PHP: 5.6.13
ImageMagick: 6.9.2-3 Q16 x86_64 2015-09-23
OS: CentOs 6.5
You would expect the later version of ImageMagick to work better and would rather use that if possible.
Could the problem be in a configuration file or a dependant library? Will provide more server details if needed.
I fixed the problem by updating ghostscript
The new server only had ghostscript 8.7, I upgraded to 9.16
You can get you ghostscript version usually by running
gs --version
When I try and open this psd file: http://bit.ly/13Y4Ani I get the above error message. It doesn't mention anything about CMYK or compression modes like most of the other "unable to open questions", and there is no output when running this from the command line. Any ideas?
I'm on Ubuntu 13.04, and using Gimp 2.8.4. I don't have access to a real Photoshop program to check the file.
I am using GIMP 2.8.4 in Windows 7 and I can't open it either.
I get
I can open the file in Irfanview and Photshop CS6.
On the Linux side I did observe that I can open the file in Krita, (Fedora 18 using KDE).
Perhaps one of these options help.
Hy there,
I have a shared hosting account. They installed Image Magick on my request. But I get this error.
PHP Fatal error: Class 'Imagick' not found in /home/hamrohos/public_html/test.php on line 6
I told them what was wrong. They replied
ImageMagick is installed, but php extension of Imagick is not enabled on shared accounts
Now my question is Can I use Image magick or its any features if its php extensions are not enabled?
Currently I am using GD library but it doesnot have all features of image magick.
I have following features disabled too.
phpinfo(), exec(), system(), passthru()
Without enabling ImageMagick extension in PHP, you won't be able to use the functions it providesdirectly.
The only way to use ImageMagick in this scenario would be to call it with a system function and execute everything as a shell script. You would have to save the image data on disk to do this and after processing them with imagemagick, you would have to load them again.
Thus, It would definitely be feasible, but with severe overhead and changes to your scripts.
I'm trying to use ImageMagick to convert a bunch of PDF into JPG (or PNG) but this error keep happenings.
convert E/paginas/pdf/E2.pdf E/paginas/pdf/E2.png
convert: no decode delegate for this image format `/tmp/magick-qX48YuZM-00000001' # error/constitute.c/ReadImage/532.
convert: Postscript delegate failed `E/paginas/pdf/E2.pdf': # error/pdf.c/ReadPDFImage/663.
convert: missing an image filename `E/paginas/pdf/E2.png' # error/convert.c/ConvertImageCommand/3015.
Same to .jpg
PS: I'm at Ubuntu 10.10
ImageMagick 6.6.0-4 just successfully converted a PDF-1.4 file to .png format. What version are the PDFs you're using, and what version of convert?
You determine the PDF version with: head -c 8 myfile.pdf
The ImageMagick version: convert --version
What you can do to diagnose the problem is to apt-get source imagemagick, and use the source line numbers in the error messages to locate the problem, and possibly fix the program to recognize the PDF, even if you have to tell the program to ignore certain sections.