convert jpeg to size suitable for printing the image on an A4 with lpr
I wrote this zsh wrapper to `convert' to do it.
With the 72 PPI resolution, the image get smaller!
With the 200 PPI resolution, the image gets bigger,
and it looks good when viewed with feh, but when
I print (with lpr) the increased-size image gets split
up in two parts on the paper with a black rectangular
box (?) showing up as well.
do-a4-pic () {
local pic=$1
local name=${pic:r}
local ext=${pic:e}
local new=${name}-a4.${ext}
local res=1654x2339 # 200 PPI; 595x842 for 72 PPI - http://www.a4papersize.org
convert $pic \
-resize $res \
-gravity center \
-background white \
-extent $res \
$new
}
This is the image I try to print in "A4 size":
http://user.it.uu.se/~embe8573/bike/shimano-b.jpg
This image is the result of the above computation and
doesn't look good when printed:
http://user.it.uu.se/~embe8573/bike/shimano-b-a4.jpg
--
underground experts united
http://user.it.uu.se/~embe8573
Reply to: