If removing the height eliminates pixellation, you should be able to see that.
Can you provide the input and output files, and values used for width and height?
text is cut off after upgrade
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: text is cut off after upgrade
snibgo's IM pages: im.snibgo.com
Re: text is cut off after upgrade
Removing the height didn't help.
As for input file and output file, the input is initially just fonts. In the end, it's outputting a pdf. Let me go through the code to manually create the input image file. I'll be back with updates. Maybe in the process of manually going through it, I'll find exactly where the pixelization is occuring.
As for input file and output file, the input is initially just fonts. In the end, it's outputting a pdf. Let me go through the code to manually create the input image file. I'll be back with updates. Maybe in the process of manually going through it, I'll find exactly where the pixelization is occuring.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: text is cut off after upgrade
I don't have your font, so I just used arial
This works just fine for me on IM 6.8.6.7 Q16
convert -size 255x299 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage 00text.png
convert 00text.png -resize 155x199 -depth 8 0text.png
Which you can write in one command as:
convert -size 255x299 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage \
-resize 155x199 -depth 8 1text.png
Doing a resize to 400% is not to badly aliased:
convert -size 255x299 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage \
-resize 400% -depth 8 2text.png
But you would be better just creating the text size you want rather than resizing it.
convert -size 1020x1196 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage -depth 8 3text.png
If you try to save to PDF and then make it larger either by using -resize or just using -density, it will stairstep, because the PDF is just an image in a PDF wrapper and not truly scalable any longer.
You can gain a bit by saving to svg and then using -density to make it larger.
However to do either PDF or SVG, you would really need to vectorize the text before saving to either. see
http://www.imagemagick.org/Usage/draw/#svg_output
http://www.imagemagick.org/Usage/draw/#other
But the best pixel way is just to create the text to the size you need.
If you are trying to do something else, please clarify and provide the exact command with arguments provided.
Please note that -quality 100 is not what you think for PNG. It is appropriate for JPG. But PNG quality/compression is specified differently. See http://www.imagemagick.org/script/comma ... hp#quality for PNG quality. Nominal is 75 and the numbers mean something different than a range of 0 to 100. Each digit means something different.
Note that I removed the -quality and reordered your command lines to more proper IM 6 syntax.
This works just fine for me on IM 6.8.6.7 Q16
convert -size 255x299 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage 00text.png
convert 00text.png -resize 155x199 -depth 8 0text.png
Which you can write in one command as:
convert -size 255x299 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage \
-resize 155x199 -depth 8 1text.png
Doing a resize to 400% is not to badly aliased:
convert -size 255x299 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage \
-resize 400% -depth 8 2text.png
But you would be better just creating the text size you want rather than resizing it.
convert -size 1020x1196 -background transparent -font arial -fill "#000000" label:"Text Here" -trim +repage -depth 8 3text.png
If you try to save to PDF and then make it larger either by using -resize or just using -density, it will stairstep, because the PDF is just an image in a PDF wrapper and not truly scalable any longer.
You can gain a bit by saving to svg and then using -density to make it larger.
However to do either PDF or SVG, you would really need to vectorize the text before saving to either. see
http://www.imagemagick.org/Usage/draw/#svg_output
http://www.imagemagick.org/Usage/draw/#other
But the best pixel way is just to create the text to the size you need.
If you are trying to do something else, please clarify and provide the exact command with arguments provided.
Please note that -quality 100 is not what you think for PNG. It is appropriate for JPG. But PNG quality/compression is specified differently. See http://www.imagemagick.org/script/comma ... hp#quality for PNG quality. Nominal is 75 and the numbers mean something different than a range of 0 to 100. Each digit means something different.
Note that I removed the -quality and reordered your command lines to more proper IM 6 syntax.
Re: text is cut off after upgrade
Thank you Fred! It works now. It was generating text at 500 pixels wide when it should have been 4500 pixels wide. Let me know if you have any trouble ordering your free shirt.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: text is cut off after upgrade
Thanks for the offer, but it is really not necessary.danieldan wrote:Let me know if you have any trouble ordering your free shirt.