got corrupt image file with half blue or gery

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
olaola
Posts: 11
Joined: 2013-07-29T08:27:28-07:00
Authentication code: 6789

got corrupt image file with half blue or gery

Post by olaola »

This happened a couple of times, we are using im4java to call the imagemagick, basically only use the convert command, the output file seems corrupt, because i can't open it with my image tool which is xnviewer i usually use, but i can still open it in windows photo viewer, then i found the image down half is kind of blue color with distorted with up half, and the very bottom edge is green, why this happened, please give me some ideas.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: got corrupt image file with half blue or gery

Post by fmw42 »

I am not sure I can help much. But you need to tell us what version of IM and what platform. What was the command? How big is the input and what input and output format?

My best guess is that your running out of memory or disk space or most likely tmp space.

Please review viewtopic.php?f=1&t=9620
olaola
Posts: 11
Joined: 2013-07-29T08:27:28-07:00
Authentication code: 6789

Re: got corrupt image file with half blue or gery

Post by olaola »

the version is ImageMagick-6.7.4-Q16, and the system is linux, probably is redhat, I am not sure, because i don't have access to that server.
The command is very simple, just add one picture to another:
convert aa.jpeg bb.png -composite -quality 95.0 -density 300 out.jpeg, aa jpeg is the base file and bb.png is the sticker file. aa.jpeg is abuot 1.8M and bb.png is 150kb.

memory and disk space should have no problem, because we have people monitor it, i am not sure what is the tmp space? Where is it? And if tmp space was not enough, why it only happened on few image files?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: got corrupt image file with half blue or gery

Post by fmw42 »

Does it happen consistently with the same file?

If you are on shared hosting, it may be possible that their tmp directory is getting full if some files are left there until the tmp directory is cleared by the OS probably overnight.

see MAGICK_TEMPORARY_PATH at http://www.imagemagick.org/script/resou ... nvironment

I am not a unix guru, so you might have to get more advice from others or from your ISP.
olaola
Posts: 11
Joined: 2013-07-29T08:27:28-07:00
Authentication code: 6789

Re: got corrupt image file with half blue or gery

Post by olaola »

fmw42 wrote:Does it happen consistently with the same file?

If you are on shared hosting, it may be possible that their tmp directory is getting full if some files are left there until the tmp directory is cleared by the OS probably overnight.

see MAGICK_TEMPORARY_PATH at http://www.imagemagick.org/script/resou ... nvironment

I am not a unix guru, so you might have to get more advice from others or from your ISP.
Not consistently with the same file, do you know what if they never set the environment variable for tmp directory, what would be the default path?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: got corrupt image file with half blue or gery

Post by fmw42 »

You would have to ask your ISP.
Post Reply