Log in

View Full Version : Resolved ImageMagick syntax question



james438
01-17-2012, 11:51 PM
In the following script what does :- do?

<?php
header('Content-Type:image/jpg');
system("convert images/pops/gdsample1.jpg -colors 13 jpg:-");
?>

james438
01-18-2012, 10:06 PM
I found the answer. jpg: says to output the image that is being processed in a jpg format. The - is the command that says do not write this to disk.

Ignore the explanation for the - above. Read the official definition of Standard Out at the bottom of the page here: http://www.imagemagick.org/script/command-line-processing.php

I'm not so sure that I understand it yet though.