Problems with missing an image filename - help!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Cutestudio

Problems with missing an image filename - help!

Post by Cutestudio »

Hi,

This is a rather long command that I crafted under convert 6.1.8, and it works perfectly with that version.
The command (used to) create(s) a button for websites, with the specified text and background.

/usr/local/bin/convert -size 109x26 xc:#5D7C93 -compose DstOut -composite -matte \( ../static/btn/a_1r12.png -flip -flop \) -gravity NorthWest -composite \( ../static/btn/a_1r12.png -flop \) -gravity SouthWest -composite \( ../static/btn/a_1r12.png -flip \) -gravity NorthEast -composite \( ../static/btn/a_1r12.png \) -gravity SouthEast -composite -composite -depth 32 -quality 100 ../static/btn/a_5print.png

I'm now running this version:
Version: ImageMagick 6.3.4 06/17/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC

and I get the error

convert: missing an image filename `../static/btn/a_5print.png'.


Now I realise that when someone at Imagemagic changed the command-line syntax they had no idea of the number of Wikis and websites that now show up on google, broken with this error, but there are thousands!! Meanwhile there are lots of helpful posts about how to fix this problem, except that none of them ever do.

So would it be possible for an expert on here to re-arrange the above syntax so that it works under the latest 6.3.4 convert? Please?


Many grateful thanks in advance if anyone manages to fix this, although of course I'm rather sceptical (and downloading 6.1.8 again...).
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problems with missing an image filename - help!

Post by Bonzo »

I would say a lot has changed since 6.1.8 and there is probably a better way to create your button now. How about posting a copy of a button so we can see what you are trying to acheve?
Cutestudio

Re: Problems with missing an image filename - help!

Post by Cutestudio »

Hi,

Here is one of the buttons:

Image

The font and background (plain or image) is configurable. Output is GIF or PNG.

The a_1r12.png image is: Image

and the output should look like: Image

There are other steps but the error throws the button making process at this step, the first one.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems with missing an image filename - help!

Post by fmw42 »

check to see if your IM recognizes PNG format

convert -list configure

Look at line starting with DELEGATES and see if it includes PNG. Your IM may be too old for this command to list DELEGATES but there should be a similar line, showing all the image formats that IM knows about.
Cutestudio

Re: Problems with missing an image filename - help!

Post by Cutestudio »

It says it supports PNG..

{gpw@Squirrel.home 1} convert -list configure

Path: /usr/local/lib/ImageMagick-6.3.4/config/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc
CFLAGS -g -O2 -Wall -W -pthread
CONFIGURE ./configure /usr/local/share/config.site /usr/local/etc/config.site
COPYRIGHT Copyright (C) 1999-2007 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include
CXX g++
CXXFLAGS -g -O2 -Wall -W -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES dps fontconfig freetype jpeg png x11 xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecate --with-quantum-depth=16 --with-fpx=no --with-fontpath=
EXEC-PREFIX /usr/local
HOST i686-pc-linux-gnu
LDFLAGS -L/usr/local/lib -L/usr/X11R6/lib -lfreetype -lz
LIB_VERSION 0x634
LIB_VERSION_NUMBER 6,3,4,9
LIBS -lMagick -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lz -lpthread -lm -lpthread
NAME ImageMagick
PCFLAGS
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 06/17/07
VERSION 6.3.4
WEBSITE http://www.imagemagick.org
{gpw@Squirrel.home 2}
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems with missing an image filename - help!

Post by fmw42 »

/usr/local/bin/convert -size 109x26 xc:#5D7C93 -compose DstOut -composite -matte \( ../static/btn/a_1r12.png -flip -flop \) -gravity NorthWest -composite \( ../static/btn/a_1r12.png -flop \) -gravity SouthWest -composite \( ../static/btn/a_1r12.png -flip \) -gravity NorthEast -composite \( ../static/btn/a_1r12.png \) -gravity SouthEast -composite -composite -depth 32 -quality 100 ../static/btn/a_5print.png
You have two -composite at the end. Take one out and try it again.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problems with missing an image filename - help!

Post by anthony »

You also have a -composite afetr only reading in ONE image. That is definatally wrong.
Read your images do the operation.

Also -compite will always replace ALL the images in the current image sequence with the one single resulting image.

You may like to read ImageMagick Basics from
http://www.imagemagick.org/Usage/basics/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply