Sorry for the strange original subject, this was unintentionally :( Anthony writes:
> Alex Schuster on wrote... > | I am generating PostScript output with convert, and I like them to > | have a title. I do this with -label. Is there a way to center the > | title, or to align to the right? > | > Yes -gravity north to center the title at the top of the image. I just tried this, and got no output at all. And http://imagemagick.org/script/command-line-options.php#gravity sounds like -gravity wouldnot work with -label. This is what I am doing (in a bash script): montage -tile "$tile" \ -pointsize $MultiPointSize \ -label $tileLabel \ -geometry "$oGeometry2" \ "[EMAIL PROTECTED]" PNG:- 2> /dev/null | convert ${rotate:+-rotate $rotate} \ -pointsize ${PointSize:-15} -font Arial \ ${topLabel:+-label "$topLabel"} \ -gravity North \ ${oGeometry:+-page "$oGeometry"} \ PNG:- PS2:"$printFile}" That is, I montage all pageFiles together with an optional label (usually unset) into PNG format, and convert this into PostScript, zooming to a little less than A4 format, and giving a title ($topLabel). Without the -gravity line, all is fine. I replaced '-label "$topLabel"' with '-annotate 0 "$topLabel"', and also got an empty image. I had already tried that before, with -draw text instead of -annotate, with the same result. While I am at it: How can I align the whole result image to the right? I thought that -gravity wohld also do this, but whenever I use it, I get an emty image. My montage works fine with the right page geometry (581x790+50+20 with 2x4 tiling), but with a different tiling I need another page geometry. I must be making some stupid mistakes here. > For example > convert -size 320x60 xc:lightblue -fill blue -gravity North \ > -annotate 0 'Hello Cruel World' annotate.gif Okay, this is working fine. And still okay when I output to annotate.ps. But when I add '-page A4', I get an empty image again. > | with this (didn't try longer, though), and with low image resolution > | the title probably gets rendered in bad resolution, too. > | > Even at low resolution the font should render well. The only time that > is not the case is when drawing on a transparent background and saving > to GIF or XPM which does not allow semi-transparent pixels. But compared to the resolution of native PostScript text? Your example above does not look too good in PS, well, it's only 72 dpi I guess. I tried to increase the resolution (-density 300) and got a small image of course. With higher size I got a good-looking font, but the image was 10 MB huge, that's 10 times the size I usually have. This would be a perfomance problem for the printer and for the server (my script automatically fetches medical ultrasound images and prints them). > | I could increase the resolution with another conversion maybe, but I > | thought I'd aske here before, maybe I'm overlooking a simpler method. > | > See.. IM Examples Postscript > http://www.cit.gu.edu.au/~anthony/graphics/imagick6/text/#postscript That's an excellent guide, Anthony! I had already read lots of it and became very impressed of ImageMagick's capabilities. I used convert for many years to convert into PostScript and resize a little, but now I am starting to do more complicated things. It's just a little overwhelming, with so many features :) Alex _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
