I have done due diligence and must admit defeat on this.  If anyone is
knowledgeable and able to help graciously, I would very much appreciate
it!  Please no "RTFM" or "If you had only googled X" messages, as I have
done all due diligence and have pulled all my hair out at this point.
Thanks to anyone who helps!

Here goes:

Given a postscript file CmdLine-orig.ps (at
http://www.dentar.com/imagemagick for example), the following command
lines work exactly as I want:
convert -trim -density 100 +repage CmdLine-orig.ps CmdLine.png
convert -trim -density 125 +repage CmdLine-orig.ps CmdLine-1.png
convert -trim -density 150 +repage CmdLine-orig.ps CmdLine-2.png
convert -trim -density 300 +repage CmdLine-orig.ps CmdLine.ps


The TclMagick code below give me the sizes I want, but all the crispness
is gone.  Just doing "SetDensity" results in files whose sizes don't get
modified from the original like I want, but resample results in
ugliness.  Just ReadImage and WriteImage ruins the file's appearance, in
fact.  Can anyone help?

package require TclMagick
package require TkMagick
package require Img

set wa1 [magick create wand]
set OUTFILE API
set TMPFILE $OUTFILE-orig.ps

$wa1 ReadImage $TMPFILE
$wa1 trim
$wa1 previous

set wa2 [$wa1 clone]
set wa3 [$wa1 clone]
set wa4 [$wa1 clone]
set wa5 [$wa1 clone]

$wa1 resample 100 100 undefined 0.0
$wa2 resample 125 125 undefined 0.0
$wa3 resample 150 150 undefined 0.0
$wa4 resample 300 300 undefined 0.0

$wa1 WriteImage $OUTFILE.png
$wa2 WriteImage $OUTFILE-1.png
$wa3 WriteImage $OUTFILE-2.png
$wa4 WriteImage $OUTFILE.ps




_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to