Dieter Britz <
dieterh...@gmail.com> wrote:
>>>>> This is the command line you want to use:
>>>>>
>>>>> convert -units pixelsperinch -density 360 foo.eps \
>>>>> -depth 8 -type truecolor -resize 3840 foo.jpg
...
>How can I do this in one step, e.g. using convert? Why does it trim?
I played with that a bit more, and would change the above command to
this:
convert -type truecolor -units pixelsperinch -density 600 foo.eps \
-depth 8 -resize 400 foo.jpg
It makes a difference with ImageMagick tools where an option is at on the
command line. While the first example above works, it turns out that if
certain other options are added in, it won't work unless the -type option
comes before the input file.
And that becomes important... when you want to try this one on for size:
convert -type truecolor -units PixelsPerInch \
-density 1000 \ # much finer lines and text
sub.eps \
-depth 32 \ # better precision
-gamma 0.454545 \ # remove gamma correction
-resize 400 \ # now resize the image
-gamma 2.2 \ # restore gamma correction
-depth 8 \ # back to 8-bit depth
-unsharp 1.5x1+0.7+0.02 \ # sharpen tone edges
-quality 90 \
sub2.jpg
Or, without the comments:
convert -type truecolor -units PixelsPerInch -density 1000 \
sub.eps -depth 32 -gamma 0.454545 -resize 400 \
-gamma 2.2 -depth 8 -unsharp 1.5x1+0.7+0.02 \
-quality 90 sub2.jpg
This is more customized to what you are doing. Setting
the density to a relatively high value (600 or more)
results in much finer lines and text. The bit depth
gets changed to 32 and the gamma correction is removed
before the resize operation is done, and then the gamma
and bit depth are restored after the resize is finished.
That makes a significant difference in the precision
with which some images are resized. (On most images it
probably is not visible.) Then a little Unsharp Mask is
used to increase contrast at tonal edges. Depending on
your exact application you might want to use a
significantly greater amount of USM.