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?".
I'm somewhat new to command line scripting (Windows XP), and am now stumped about how to get the results of an IM command and write it to a text file. I'm comparing images and would like to get the output (number of pixels that are different) and write it to a text file. Or, better yet, get the result in the script and assign it to a variable for further manipulation.
The variables are file names and directories and some input test numbers. This command writes nothing to the results.txt file though. The output is written to the screen:
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Hi! Your code is what i needed... Do you know how to convert it in vbscript?
I would actually need the AE value to test if it's equal to zero or not. I'm having a hard time looking for resources where I need to pass the value of batch result to use in my vbscript. Once the value is tested, if it's equal to zero then the script will exit, otherwise it will send an email to me. Thank you in advance.
anthony wrote:Example do not detail the handling of standard error output in windows. If there even is such a concept in BAT scripts.
The example demonstrates how you read stdout of a DOS command into VBScript. You can then perform the testing of the value within VBScript and act upon the result. So I think that this would do what what is asked for over here. But I will check whether there is a possibility to read stderr back into VBScript.
Where do you find the output results.txt file after running command? The command is working. I get my jpg output, but I don't have any results file afterwards. My command looks like this
OK I see the example is only for the compare command. The title for the post attracted me because I need the command line output in a text file. How can this be accomplished? All I really need is a file-size and name report output in a text file. Thanks
Raster data from the crop new images would not normally be put into a text file.
Images can be written to text, but you would then replace the output jpg with a textfile.txt. But that will be a huge amount of text, one line of text information for every pixel.
I just need the jpg file name and the file size in a text file. I don't need any conversion of the jpg output to text. I want this in same directory that my jpg is output to. I want it generated with the same command that creates the jpg output. That is why I thought the command above with the pipe output was what I am looking for. When my command is finished, I want to a jpg of my PDF, and text file reporting the name and file size (kb) of the jpg. Thanks
Last edited by pctechtv on 2016-10-29T10:28:25-07:00, edited 1 time in total.