[magick-users] Image Magic (convert)

Rebecca York Rebecca.York at 2ndbyte.com
Wed Sep 26 04:04:55 PDT 2007


Hiya,

I'm having problems with image magic (convert.exe)

convert.exe c:\foo.jpg -filter Lanczos -resize 640x480! -sharpen 1x0.75
-blur 1x0.3 -quality 76 -strip -sampling-factor 2x2 -compress JPEG
c:\foo2.jpg

This works fine on valid jpg images, resizes them nicely;

The problem occurs when the image isn't a valid jpg file, convert.exe
returns but keeps the process running, and when a certain number of
convert.exe processes are running (we've counted 100s of them at some
points) it stops resizing any images at all. (the images are actually on a
UNC share not c:\)

To get around this I want to put in a script to quickly go through the
images and automatically discard invalid images - is there any quick way of
checking whether a jpg is valid or not?

These are uploaded by clients and they put in loads of junk

Thanks.



Rebecca York
Systems Architect
____________________________

2nd Byte - Impressing Used Car Customers

2nd Byte Ltd 
Network House
South Street
Godalming
Surrey GU7 1BZ
UK

Tel: +44 (0)1483 42 42 42
Fax: +44 (0)1483 42 72 42
Email: Rebecca.York at 2ndbyte.com
Web: www.2ndbyte.com

Confidentiality

This e-mail is intended only for the addressee and may contain information
that is confidential or privileged.  If you are not the intended recipient
you must not use, disclose, distribute, copy, print or rely on this e-mail.
If an addressing or transmission error has misdirected this e-mail, please
notify the author by replying to this e-mail. Whilst we run antivirus
software on all Internet emails we are not liable for any loss or damage.
All information contained in this email has been prepared using information
believed by the author to be reliable and accurate, but 2nd Byte makes no
warranty as to accuracy and completeness. Any opinions expressed in this
email are those of the author and do not necessarily reflect the opinions of
2nd Byte.
Registered office: 2nd Byte Limited, Unit 6 Thatcham Business Village,
Colthrop Lane, Thatcham, Berkshire, RG19 4LW.
Registered in England with company number 2912794.



More information about the Magick-users mailing list