Page 1 of 1
looking for docs for PRINT command
Posted: 2018-01-17T08:31:24-07:00
by holden
The only place I've been able to find anything is here:
https://www.imagemagick.org/script/formats.php
Is there a more comprehensive doc or examples concerning the PRINT function available? Thanks
Re: looking for docs for PRINT command
Posted: 2018-01-17T10:18:13-07:00
by fmw42
What is your IM version and platform? What do you want to print? What was your exact command line apart from the printing? What had you tried.
Imagemagick uses -write to save images. It uses txt: to convert the image to list the pixels. It use -format ... info: to list certain meta data to the terminal.
See
https://www.imagemagick.org/Usage/files/ and
https://www.imagemagick.org/script/comm ... .php#print
Re: looking for docs for PRINT command
Posted: 2018-01-17T13:53:02-07:00
by holden
IM on Windows, whatever version I need to make it happen
from the page I linked:
PRINT Send image to your computer printer Unix users may set the PRINTER (for 'lpr') or LPDEST (for 'lp') environment variables to select the desired printer.
I haven't tried anything yet, just looking for docs to see if printing through IM is a viable option for automation at this point.
Re: looking for docs for PRINT command
Posted: 2018-01-17T14:24:27-07:00
by fmw42
What is you want to print? Pictures or text. If pictures, then just save them to file and use some other tool such as your browser to print them to a printer.
Sorry I have never used that print feature before for printing images. I know of no other documentation for that, but it might exist somewhere. I do not know if that is Windows friendly or not.
Re: looking for docs for PRINT command
Posted: 2018-01-17T15:12:11-07:00
by snibgo
"-print" is used with a meaning as in C "printf()". It sends text to the console. It isn't concerned with physically printing on paper. "-print XYZ" is short for "-format XYZ -write info:".
Re: looking for docs for PRINT command
Posted: 2018-01-17T16:44:29-07:00
by fmw42
snibgo wrote: ↑2018-01-17T15:12:11-07:00
"-print" is used with a meaning as in C "printf()". It sends text to the console. It isn't concerned with physically printing on paper. "-print XYZ" is short for "-format XYZ -write info:".
Those do not work on my Mac (unix). Perhaps I am doing something wrong.
This works:
Code: Select all
convert rose: -format "%wx%h\n" info:
70x46
These do but give error messages:
Code: Select all
convert rose: -format "%wx%h\n" -write info:
70x46
convert: missing an image filename `info:' @ error/convert.c/ConvertImageCommand/3255.
70x46
convert: missing an image filename `%wx%h\n' @ error/convert.c/ConvertImageCommand/3255.
Re: looking for docs for PRINT command
Posted: 2018-01-17T17:00:30-07:00
by snibgo
What I mean is that anywhere you can put "-format XYZ -write info:", you can instead put "-print XYZ". For example:
Code: Select all
f:\prose\PICTURES>convert rose: -format "%wx%h\n" -write info: x.png
70x46
f:\prose\PICTURES>convert rose: -print "%wx%h\n" x.png
70x46
Re: looking for docs for PRINT command
Posted: 2018-01-17T17:04:18-07:00
by fmw42
snibgo, thanks for the clarification. I had never used -print before.
Re: looking for docs for PRINT command
Posted: 2018-01-18T11:42:29-07:00
by holden
It would seem this is a pretty obscure IM function, I will keep looking for another solution (it is surprisingly hard to find a way to send prints to printers in an automated way).
Re: looking for docs for PRINT command
Posted: 2018-01-18T11:50:07-07:00
by fmw42
I do not think Imagemagick has a direct print to printer command for images.
Re: looking for docs for PRINT command
Posted: 2018-01-18T11:56:02-07:00
by snibgo
On Unix, printers are devices which are files, so it should be easy, maybe.
On Windows, IrfanView works fine, eg:
Re: looking for docs for PRINT command
Posted: 2018-01-18T11:58:14-07:00
by fmw42
Re: looking for docs for PRINT command
Posted: 2018-01-18T18:36:19-07:00
by anthony
Also see Identify Output Alternatives...
http://www.imagemagick.org/Usage/basics/#identify_alt
The main difference between "-identify" and "-print", is that first will be run once for every image in memory, while the later will only run once.