error - convert: missing an image filename

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
gmon

error - convert: missing an image filename

Post by gmon » 2008-12-23T00:18:33-07:00

# /usr/bin/convert -verbose -quality 90 "/home/mwbatches/2008-12-23_07-03-07/temp_A219_8717578054169.jpg" "/home/mwbatches/2008-12-23_07-03-07/A219_8717578054169.jpg"
Start of Image
Define Huffman Table 0x00
0 1 5 1 1 1 1 1
1 0 0 0 0 0 0 0
Define Huffman Table 0x01
0 3 1 1 1 1 1 1
1 1 1 0 0 0 0 0
Define Huffman Table 0x10
0 2 1 3 3 2 4 3
5 5 4 4 0 0 1 125
Define Huffman Table 0x11
0 2 1 2 4 4 3 4
7 5 4 4 0 1 2 119
End Of Image
convert: missing an image filename `/home/mwbatches/2008-12-23_07-03-07/A219_8717578054169.jpg'

I've tried
* building the latest version: ImageMagick 6.3.7
* apt-get install of the latest: ImageMagick 6.3.7 02/19/08 Q16
* older versions of imagemagick: ImageMagick-6.3.2-9.tar.gz
** This got past the "missing an image filename" error but failed on something else instead. i can get those reports if needed
* not installing the php gd class


And here's my entire server build script!


#---------------------------------------------------------------------------------------------------
# Create an instance of base Ubuntu Hardy AMI with ID
# ami-1cd73375 is newest at time of authoring this file (ami-6a57b203 is used in tutorial)
# http://developer.amazonwebservices.com/ ... nalID=1427
#---------------------------------------------------------------------------------------------------

# STUFF YOU WILL NEED TO ENTER
# STEP: phpmyadmin - Choose apache 2
# STEP: proftpd - select standalone
# STEP: root access password



#---------------------------------------------------------------------------------------------------
# Passwords and codes - declared as local vars for use below
#---------------------------------------------------------------------------------------------------
S3ACCESSKEY=xx
S3SECRETKEY=xx
MYSQLPASSWORD=xx
S3PASSPHRASE=xx



#---------------------------------------------------------------------------------------------------
# Beginning of buildserver batch script - file is written and then executed
#---------------------------------------------------------------------------------------------------

cat > /buildserver << BATCH_EOF

#! /bin/bash





#---------------------------------------------------------------------------------------------------
# BEGIN OF BASH
#---------------------------------------------------------------------------------------------------

# Set up history to remember forever and store each command as it's called so new shells have a history
echo "" >> ~/.bashrc
echo "##### MW SCRIPT INSTALL CHANGES #####" >> ~/.bashrc
echo "shopt -s histappend" >> ~/.bashrc
echo "PROMPT_COMMAND='history -a'" >> ~/.bashrc
echo "export HISTCONTROL=ignoredups" >> ~/.bashrc



#make the installs dir
mkdir /installs


#---------------------------------------------------------------------------------------------------
# Configure LAMP server on Amazon Ec2
# http://arope99.blogspot.com/2008/05/con ... n-ec2.html
#---------------------------------------------------------------------------------------------------

#Install LAMP
sudo tasksel install lamp-server

#Once that is completed, let's enable mod rewrite to support pretty URL.
a2enmod rewrite

#Let's first update the apt-get application
apt-get -y update

#Install phpmyadmin with the following command.
apt-get install -y -q phpmyadmin
#(Choose apache 2)


#Copy the original apache2.conf file to a backup file
cp /etc/apache2/apache2.conf /etc/apache2/apache2_ORIGINAL_INSTALL.conf


echo "" >> /etc/apache2/apache2.conf
echo "##### MW SCRIPT INSTALL CHANGES #####" >> /etc/apache2/httpd.conf


#To setup phpmyadmin under apache all you need to do is include the following line in /etc/apache2/httpd.conf
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/httpd.conf



#---------------------------------------------------------------------------------------------------
# SSL - https://help.ubuntu.com/community/forum ... pache2/SSL
#---------------------------------------------------------------------------------------------------

apt-get install -y ssl-cert

#make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem

a2enmod ssl

/etc/init.d/apache2 reload



cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default_ORIGINAL

# Alter main host to point to just port 80
cat > /etc/apache2/sites-available/default << EOF

NameVirtualHost *:80

<VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

AuthType Basic
AuthName "mywebsite Administration Page"
AuthUserFile /var/www/.htpasswd
Require valid-user

</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

EOF



cp /etc/apache2/sites-available/ssl /etc/apache2/sites-available/ssl_ORIGINAL

# write a new ssl file to port 442 (SSL)
cat > /etc/apache2/sites-available/ssl << EOF

NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin admin@mywebsite.com
DocumentRoot /var/www/

<directory />
Options FollowSymLinks
AllowOverride All
</directory>

<directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require user wsabstract
</directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory "/usr/lib/cgi-bin">
AllowOverride All
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</directory>



Alias /doc/ "/usr/share/doc/"
<directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</directory>

ServerName mywebsite.com


SSLEngine On
SSLCertificateFile /var/www/ssl/mywebsite.com.crt
SSLCertificateKeyFile /var/www/ssl/mywebsite.com.key

ErrorLog /var/log/apache2/error.log
CustomLog /home/logs/domlogs/mywebsite.com-ssl_log combined
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>

EOF

a2ensite ssl

/etc/init.d/apache2 force-reload


#---------------------------------------------------------------------------------------------------
# Mysql
#---------------------------------------------------------------------------------------------------

# mySQl Password
apt-get install -y mysql-client-5.0


apt-get install -y mysql-server

# mySQl Password
mysqladmin -u root password $MYSQLPASSWORD

#turn off the binding to make mysql public - mainly for mysqlyog access
perl -pi -e 's/bind-address/#bind-address/g' /etc/mysql/my.cnf

#increase the query cache size (50M)
perl -pi -e 's/query_cache_size = 16M/query_cache_size = 50M/g' /etc/mysql/my.cnf


#optimize mysql
#http://www.debuntu.org/2006/07/21/75-ho ... ponse-time


echo "##### MW SCRIPT INSTALL CHANGES #####" >> /etc/mysql/my.cnf
echo 'skip-name-resolve' >> /etc/mysql/my.cnf
echo 'query_cache_type = 1' >> /etc/mysql/my.cnf




#---------------------------------------------------------------------------------------------------
# PHP
#---------------------------------------------------------------------------------------------------
#PHP CURL
apt-get install -y php5-curl

#Graphics Lib for php
apt-get install -y php5-gd

#Command line control for php
apt-get install -y php5-cli

#pear for php
apt-get install -y php-pear

#pear - CRYPT
pear install crypt_hmac

#pear http request
pear install HTTP_request

#SMTP emails
apt-get install -y Net_SMTP
apt-get install -y php-net-smtp
apt-get install -y php-mail



#---------------------------------------------------------------------------------------------------
#config php.ini
#---------------------------------------------------------------------------------------------------

#Copy the original apache2.conf file to a backup file
cp /etc/php5/apache2/php.ini /etc/php5/apache2/php_ORIGINAL_INSTALL.ini
perl -pi -e 's/register_globals = Off/register_globals = On/g' /etc/php5/apache2/php.ini





#---------------------------------------------------------------------------------------------------
# FTP INSTALL
# http://www.ubuntugeek.com/settingup-an- ... oftpd.html
#---------------------------------------------------------------------------------------------------
apt-get install -y -q proftpd
# select standalone


#Copy the original file to a backup file
cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd_ORIGINAL_INSTALL.conf


echo "" >> /etc/proftpd/proftpd.conf
echo "##### MW SCRIPT INSTALL CHANGES #####" >> /etc/proftpd/proftpd.conf
echo 'ServerIdent on "Welcome to the Music Window server"' >> /etc/proftpd/proftpd.conf
echo 'UseReverseDNS off' >> /etc/proftpd/proftpd.conf
echo "IdentLookups off" >> /etc/proftpd/proftpd.conf
echo "RequireValidShell off" >> /etc/proftpd/proftpd.conf

#restart the service - should pass
/etc/init.d/proftpd restart

#perform a syntax check of your proftpd.conf
proftpd -td5




#---------------------------------------------------------------------------------------------------
# S3cmd
#---------------------------------------------------------------------------------------------------
# s3cmd
apt-get install -y s3cmd

cat > /root/.s3cfg << EOF
[default]
access_key = $S3ACCESSKEY
secret_key = $S3SECRETKEY
acl_public = False
bucket_location = US
delete_removed = False
dry_run = False
encrypt = False
force = False
gpg_command = /usr/bin/gpg
gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o

%(output_file)s %(input_file)s
gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o

%(output_file)s %(input_file)s
gpg_passphrase = $S3PASSPHRASE
host_base = s3.amazonaws.com
host_bucket = %(bucket)s.s3.amazonaws.com
human_readable_sizes = False
preserve_attrs = True
proxy_host =
proxy_port = 0
recv_chunk = 4096
send_chunk = 4096
use_https = False
verbosity = WARNING
EOF


#---------------------------------------------------------------------------------------------------
# S3sync
#---------------------------------------------------------------------------------------------------
cd /installs/
wget http://s3.amazonaws.com/ServEdge_pub/s3 ... ync.tar.gz
tar xvzf s3sync.tar.gz
cd s3sync

mkdir /etc/s3conf/

cat > /etc/s3conf/s3config.yml << EOF
aws_access_key_id: $S3ACCESSKEY
aws_secret_access_key: $S3SECRETKEY
EOF




#---------------------------------------------------------------------------------------------------
# Misc tools
#---------------------------------------------------------------------------------------------------

# RUBY on rails
apt-get install -y rails

# Instal GCC (with the best score)
aptitude install -y build-essential



#---------------------------------------------------------------------------------------------------
# BATCH PROCESSING TOOLS
#---------------------------------------------------------------------------------------------------

# ZIP
apt-get install -y zip

# UNZIP
apt-get install -y unzip

# FLAC
#cd /installs
#wget http://ftp.de.debian.org/debian/pool/ma ... rig.tar.gz
#tar xvzf flac_1.1.2.orig.tar.gz
#cd flac-1.1.2
#./configure && make && make install
apt-get install -y flac

#LAME
apt-get install -y lame

# id3v2 - the tag editor
apt-get install -y id3v2

# SOX
apt-get install -y sox

#bug in sox requires getting a little more (v14.0.0.0)
#http://www.mail-archive.com/debian-bugs ... 41147.html
apt-get install -y libsox-fmt-alsa
apt-get install -y libsox-fmt-ao
apt-get install -y libsox-fmt-base

# ecasound
apt-get install -y ecasound


# imagemagick - image conversion
apt-get install -y imagemagick



ldconfig



#---------------------------------------------------------------------------------------------------
# ROOT PASSWORD
#---------------------------------------------------------------------------------------------------
# Set up a root password now
passwd




#Restart mySQL
/etc/init.d/mysql restart


#Restart apache.
/etc/init.d/apache2 force-reload
/etc/init.d/apache2 restart

#startup ssh
/etc/init.d/ssh start


BATCH_EOF

# RUN THE BATCH
chmod a+x /buildserver && /./buildserver


Can anyone suggest a work around? Can anyone see a conflict?

Thank you! :)

gmon

Re: error - convert: missing an image filename

Post by gmon » 2008-12-23T15:08:23-07:00

BTW: If you have an amazon ec2 account, you can create the image (ami-1cd73375) and paste the script in and see exactly what I see. Hows that for a test case?!? :D

gmon

Re: error - convert: missing an image filename

Post by gmon » 2008-12-23T22:02:28-07:00

Solved this myself. The answer: Corrupt input file! :)

kbirecki
Posts: 8
Joined: 2011-02-23T03:19:57-07:00
Authentication code: 8675308

Re: error - convert: missing an image filename

Post by kbirecki » 2011-07-09T05:14:52-07:00

I know this is an old thread, but for future readers, another cause can be incorrect registry entries pointing to GhostScript. There is a simple solution that I found and I made it my first blog entry: http://hallsoftech.blogspot.com/2011/07 ... image.html.

Post Reply