imagemagick mac os open gif files - macos

i'm trying to convert a png file to gif with:
convert 1.png 1.gif
convert: no decode delegate for this image format `1.png' # error/constitute.c/ReadImage/533.
convert: missing an image filename `1.gif' # error/convert.c/ConvertImageCommand/2919.
and it's not working on my imagemagick installation on OSX as you can se above, I installed it with brew and when running convert it shows the following delegates:
$ convert -list configure| grep DELEGATES
DELEGATES bzlib freetype jpeg jng jp2 png tiff x11 xml zlib
On another computer the command works and this are the delegates:
$ convert -list configure| grep DELEGATES
DELEGATES bzlib mpeg freetype jng jpeg lzma png tiff webp xml zlib
The missing delegates on the computer that doesnt works are: mpeg, lzma and webp. However I wonder which of those could be required for open a gif file.

The problem is the decode (i.e. read) delegate, so it is failing to read the input file rather than to write the output file.
Try:
brew rm imagemagick
brew install libpng
brew install imagemagick

Related

Graphviz seems doesn't support png and map

Hi I must convert a graph (a .dot) to a map and to a png because I must generate dependencies graph with doxygen using graphviz. But I have a error:
error: problems opening map file
If I do dot -v I have
dot - graphviz version 2.38.0 (20140413.2041)
libdir = "/usr/local/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.6
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
/usr/local/lib/graphviz/config6
was successfully loaded.
render : dot fig map pic pov ps svg tk vml xdot
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp
twopi
textlayout :
device : canon cmap cmapx cmapx_np dot eps fig gv imap imap_np ismap
pic plain plain-ext pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2
loadimage : (lib) eps gif jpe jpeg jpg png ps svg
There isn't map and png for render
Moreover if I do dot -Tpng
Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np
dot eps fig gv imap imap_np ismap pic plain plain-ext pov ps ps2 svg
tk vml vmlz xdot xdot1.2 xdot1.4
It seem that I have not the library for png and map.
How can I fix the problem?
(I do not remember how at the time I installed grapghviz)
(I'm working on Linux SO)
Graphviz plugins need to be registered before they can be used. In Windows, open the command prompt as admin and type dot -c to register. You can verify it by typing dot -v
I had the same problem on Centos 7 and I was able to solve it by
installing the graphviz-gd package with the command yum install graphviz-gd
After the installation I executed dot -c and now dot -v shows the following devices:
canon cmap cmapx cmapx_np dot eps fig gd gd2
gif gv imap imap_np ismap jpe jpeg jpg pic plain
plain-ext png pov ps ps2 svg svgz tk vml vmlz
vrml wbmp xdot xdot1.2 xdot1.4
Moreover I use the cmapx to create the map file.
Regards,
nemo
I had same issue on macos 10.14. Solved the issue by reinstalling graphviz, and somehow it says 'not linked' as following
Warning: graphviz 2.47.3 is already installed, it's just not linked. To link this version, run: brew link graphviz
So end up with the following two commands:
brew install -f -s graphviz
brew link --overwrite graphviz

pdfcairo 'unknown or ambiguous terminal type' in gnuplot

After upgrading gnuplot from 4.6 to 5.0.1, I encounter the following error:
set terminal pdfcairo size 3.0in,2.25in font ',8'
^
"plot.plt", line 114: unknown or ambiguous terminal type; type just 'set terminal' for a list
How can I fix it?
PS: pdfcairo works fine in the previous version (4.6).
I install the gnuplot by the following command:
#build it:
./configure --with-cairo
make
#install it:
sudo make install
As described in GNUPLOT Version 5.0.1 Release Notes, the pdfcairo is included by default.
Cairo/pango/wxWidgets This set of terminals includes
pngcairo, pdfcairo, epscairo, and cairolatex for output to a file
wxt for interactive display All of these will be built by default if the
configuration script finds the required libcairo, libpango, libcairo,
libwxgtk, and related support libraries To disable these terminals:
./configure --without-cairo ./configure --with-cairo --disable-wxt
I fix it with the kind reminder of #Christoph.
To tackle this issue, install the dependency libraries for cairo-based terminals by the follwoing command:
sudo apt-get install libcairo2-dev
sudo apt-get install libpango1.0-dev
And then compile gnuplot again:
#build it:
cd gnuplot-5.0.1 ; ./configure ; make
#install it:
sudo make install
Now, everything is fine. Enjoy it:-)
gnuplot> set term
Available terminal types:
cairolatex LaTeX picture environment using graphicx package and Cairo backend
canvas HTML Canvas object
cgm Computer Graphics Metafile
context ConTeXt with MetaFun (for PDF documents)
corel EPS format for CorelDRAW
dumb ascii art for anything that prints text
dxf dxf-file for AutoCad (default size 120x80)
eepic EEPIC -- extended LaTeX picture environment
emf Enhanced Metafile format
emtex LaTeX picture environment with emTeX specials
epscairo eps terminal based on cairo
epslatex LaTeX picture environment using graphicx package
fig FIG graphics language for XFIG graphics editor
hpgl HP7475 and relatives [number of pens] [eject]
latex LaTeX picture environment
mf Metafont plotting standard
mp MetaPost plotting standard
pcl5 HP Designjet 750C, HP Laserjet III/IV, etc. (many options)
pdfcairo pdf terminal based on cairo
pngcairo png terminal based on cairo
postscript PostScript graphics, including EPSF embedded files (*.eps)
Press return for more:

How to set up phpimagik in Mac OS X?

Can anyone tell me simple step by step to set up phpimagick in OS X?
Yes, use homebrew. Go to the homebrew website and install it with the one line script there. - I don't want to paste it here because you need the latest and greatest line at the time of following these instructions.
Then, when you have homebrew installed, do these steps to get ImageMagick installed and running under PHP and also with Apache.
# Check all of homebrew is working - fix any errors before proceeding
brew doctor
# Get latest versions of everything if you already had "homebrew" installed
# Probably not necessary if you just installed "homebrew" in previous step
brew update && brew upgrade
# Find latest PHP version - using "brew search"
newestPHP=$(brew search php | grep -E "php[0-9]+$" | sort | tail -1)
echo $newestPHP
e.g. php56
# Install latest PHP and corresponding ImageMagick
brew install ${newestPHP} ${newestPHP}-imagick
e.g. brew install php56 php56-imagick
# Check that the installation worked - you MUST use "/usr/local/bin/php"
/usr/local/bin/php -i | grep -i imag
Output
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-imagick.ini
PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
imagick
imagick module => enabled
imagick module version => 3.1.2
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version => ImageMagick 6.9.1-1 Q16 x86_64 2015-04-15 http://www.imagemagick.org
ImageMagick copyright => Copyright (C) 1999-2015 ImageMagick Studio LLC
ImageMagick release date => 2015-04-15
ImageMagick number of supported formats: => 204
ImageMagick supported formats => 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, ERF, FAX, FITS, FRACTAL, FTS, G3, GIF, GIF87, GRADIENT, GRAY, GV, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TILE, TIM, TTC, TTF, TXT, UBRL, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, YCbCr, YCbCrA, YUV
imagick.locale_fix => 0 => 0
imagick.progress_monitor => 0 => 0
That completes the installation if you only want to run ImageMagick under PHP outside your website.
The remaining steps are only necessary if you want to run PHP and ImageMagick under Apache inside your website.
# Check if PHP module loaded in Apache config file - /etc/apache2/httpd.conf
grep "^LoadModule.*php5_module.*libphp.*" /etc/apache2/httpd.conf
Check it matches, or if not present add a line like this
LoadModule php5_module /usr/local/Cellar/php56/5.6.6/libexec/apache2/libphp5.so
# Restart Apache
sudo apachectl restart

How do you install a universal variant of an outdated version of a port file?

OS X 10.7.5
I need the universal variant of libjpeg v8 (jpeg #8d_0+universal), but MacPorts seems to insist that if I am to have the universal variant, it must be the latest version (jpeg #9_1+universal)
I've looked through the MacPorts documentation and other resources, and I've found the description of how to install an old version, and how to install a universal build, but no explanation of why MacPorts ignores the version number I request when looking for a universal build.
Here's what I did, and what happened:
$ port installed jpeg
Warning: port definitions are more than two weeks old, consider using selfupdate
The following ports are currently installed:
jpeg #8c_0
jpeg #8d_0 (active)
jpeg #9_1
$ sudo port install jpeg #8d_0 +universal
Password:
Warning: port definitions are more than two weeks old, consider using selfupdate
---> Fetching archive for jpeg
---> Attempting to fetch jpeg-9_1+universal.darwin_11.i386-x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/jpeg
---> Attempting to fetch jpeg-9_1+universal.darwin_11.i386-x86_64.tbz2 from http://packages.macports.org/jpeg
---> Attempting to fetch jpeg-9_1+universal.darwin_11.i386-x86_64.tbz2 from http://lil.fr.packages.macports.org/jpeg
---> Fetching distfiles for jpeg
---> Attempting to fetch jpegsrc.v9.tar.gz from http://www.ijg.org/files/
---> Verifying checksum(s) for jpeg
---> Extracting jpeg
---> Applying patches to jpeg
---> Configuring jpeg
---> Building jpeg
---> Staging jpeg into destroot
---> Installing jpeg #9_1+universal
---> Deactivating jpeg #8d_0
---> Cleaning jpeg
---> Activating jpeg #9_1+universal
---> Cleaning jpeg
---> Updating database of binaries: 100.0%
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
$ port installed jpeg
Warning: port definitions are more than two weeks old, consider using selfupdate
The following ports are currently installed:
jpeg #8c_0
jpeg #8d_0
jpeg #9_1
jpeg #9_1+universal (active)
In case it wasn't clear, the desired end state is:
jpeg #8c_0
jpeg #8d_0+universal (active)
jpeg #9_1
I tried uninstalling all the installed versions of jpeg first, then re-attempting to install jpeg #8d_0+universal, but that had no effect - MacPorts just fetched and installed jpeg #9_1+universal. I've tried
sudo port install jpeg #8d_0 +universal
and
sudo port install jpeg #8d_0+universal
but got the same behavior.
Any suggestions for how to achieve this? Thank you!

RMagick - ImageMagick gives error "no decode delegate for this image format"

The problem occurs when i try to manipulate an image uploaded from sinatra.
File.open(params[:file][:tempfile]) do |p|
thumb = Magick::Image.read(p)
thumb.crop_resized!(75, 75, Magick::NorthGravity)
end
The uploaded file is a jpeg, form data when uploading image includes
{:filename=>"299732_176749115737355_100002068035867_380115_618512842_n.jpg", :type=>"image/jpeg", :name=>"file", :tempfile=>#<File:/var/folders/hf/d6vx6vg56nbd5n44jjrp84k80000gn/T/RackMultipart20120228-55947-1fd2l6c>, :head=>"Content-Disposition: form-data; name=\"file\"; filename=\"299732_176749115737355_100002068035867_380115_618512842_n.jpg\"\r\nContent-Type: image/jpeg\r\n"}
And also ImageMagick has the necessary delegates
convert -list configure
returns
DELEGATES bzlib freetype jpeg jng jp2 lcms png tiff x11 xml zlib
So, i should be able to upload and transform a jpeg, but it whines about delegates.
Also i am working on Mac OSX 10.7, maybe another weird problem with mac
I found solution for me:
tmpfile = params[:file][:tempfile]
image = Magick::ImageList.new
bin = File.open(tmpfile, 'r'){ |file| file.read }
img = image.from_blob(bin)
I suppose problem occurs because rmagick try to define image type by file extension. But uploaded file without extension.
Good luck!

Resources