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?".
REM Prints image width.
CALL path\to\image\magick\identify.exe -format %%w path\to\image\image.png
REM Prints image height.
CALL path\to\image\magick\identify.exe -format %%h path\to\image\image.png
I call several times identify.exe simultaneously and sometimes it prints nothing.
Yes, I call identify.exe with Apache Ant 'exec' task where I provide it with 'error' property which redirects 'stderr' to a particular file. The file is empty.
Forgot to mention what version of ImageMagick do I use. It's ImageMagick-6.8.9-Q8. Should I try Q16 version?
There may be some logic to what you are doing but according to the Apache Ant Wiki:
Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects.
Why would you be using this to read image data?
Have you tried this with plain php and exec() to see if the problem is with Imagemagick or Ant?
I was thinking about this last night and I had a problem once where the temporary file name was the same when resizing multiple images. The temporary filename was being overwritten by the next process before the first process was completed. You could be having a similar problem with your variables?
Also adding -ping after the identify.exe should speed up your process.
Seems like I've managed to solve my problem. ImageMagick was not the case as problem remained when I switched to custom little PHP-script that printed out image size in 'stdout'. What was causing the problem was reading from 'stdout' in parallel Apache Ant project. I don't know why. When I switched to tempfiles problem disappeared. For those who may encounter to same problem I wrote detailed answer in StackOverflow post.
Thank you guys for throwing some ideas to me. Really helped.