Problem regarding resizing text

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
murer

Problem regarding resizing text

Post by murer »

HI,
situation is as follows: I have a png of a newspaper on the net, and I want it to divide into several pages
which works fine and then scale it to A4 format. Problem is, the text is blurry
after I resize it. I tried numerous filters, -adaptive-resize, to use -sharp and +contrast but none gives satisfying results.
Anyone got experience with this and has an idea?
If I print the unscaled image on an A4 paper, (after I converted it to pdf), it looks just fine, so it got to be possible some way. I hope.
Thanks for your help!
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problem regarding resizing text

Post by Bonzo »

Adding a density works for a pdf file I wonder if it will help a png ?

Try:

Code: Select all

convert -density 400 input.png -resize 210x297 output.png
murer

Re: Problem regarding resizing text

Post by murer »

thanks. it didn't work though. I have to mention that I need to make it smaller.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem regarding resizing text

Post by anthony »

As you are starting with PNG, scaling up the image will always make it fuzzier, or more blocky. there is not good solution for this.

Postscript and PDF image formats get around this as they are verctor formats that 'draw' the text at the appropriate (any) scale.

I and hoping to implement sometime a scaleX2 algorithm that does a good job of magnification scaling while preserving colors, though it may be a long time in coming.

However if your image is black and white, you could try resizing the image, then doing -threshold and/or -sigmoidal-contrast operations to sharpen the resulting image enlarged image.

see http://www.imagemagick.org/Usage/color/#sigmoidal
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply