Page 1 of 1

change text image into 300 dpi

Posted: 2011-04-30T12:25:16-07:00
by ratneshsoni
hello
I want to change the text image into 300 dpi while it is creating, mean to say that is there is any way to generate the text image into 300 dpi when it is creating. I am using fred's script to generate the text image and i also want this in resize the images.
Default is 72 DPI. Or there is any way to set 300 dpi as default dpi.
Please help me ASP.

Re: change text image into 300 dpi

Posted: 2011-04-30T12:50:42-07:00
by fmw42
try

texteffect .... MIFF:- | convert - -density 300 outputimage

or modify the script to add -density 300 just before the $outfile

Re: change text image into 300 dpi

Posted: 2011-05-01T03:03:22-07:00
by ratneshsoni
i try the below code but it not work.
./texteffect.sh -t 'TEST NAME' -f 'images/ttf_files/impact.ttf' -p 24 -c '#000000' -b transparent -u none -density 300 test1.png
if i change the DPI after generating text it distort the image that i dont want. Please Help me i want to specify the density when i generating text
Please help me ASP

Re: change text image into 300 dpi

Posted: 2011-05-01T12:00:41-07:00
by fmw42
ratneshsoni wrote:i try the below code but it not work.
./texteffect.sh -t 'TEST NAME' -f 'images/ttf_files/impact.ttf' -p 24 -c '#000000' -b transparent -u none -density 300 test1.png
if i change the DPI after generating text it distort the image that i dont want. Please Help me i want to specify the density when i generating text
Please help me ASP
You have to open the texteffect script file and use a text editor to add -density just before the $outfile at the end of the file.

Note that png only allows metric density so 300 is not dots per inch but dots per centimeter or (meter).

Change the following:


if [ "$rotation" != "0" -a "$rotation" != "0.0" -a "$rotation" != ".0" ]
then
convert $tmpA0 -background "$bc" -rotate $rotation $outfile
else
convert $tmpA0 $outfile
fi

exit 0


to



if [ "$rotation" != "0" -a "$rotation" != "0.0" -a "$rotation" != ".0" ]
then
convert $tmpA0 -background "$bc" -rotate $rotation -density 300 $outfile
else
convert $tmpA0 -density 300 $outfile
fi

exit 0

Note -density has no bearing on the digital image. It only affects how the image is printed. So I don't understand your comment about distorting the image.