affine transform smooth jagged edges

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
gmanojbabu

affine transform smooth jagged edges

Post by gmanojbabu »

Hi All,
I am using affine transform as shown below
convert \( -resize 208x290 \( 10singleimage.jpg -affine 0.6293203830718994,0.7771459817886353,-0.7771459817886353,0.6293203830718994,237.8,46.55 -transform \) \) +page -matte -background None ln0OWlHG10singleimagebackground.jpg -insert 0 -flatten test.jpg

By doing this, the resulting image on which i am applying affine transform shows jagged edges.
Is there a way to smooth this jagged edges by using affine transform.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: affine transform smooth jagged edges

Post by fmw42 »

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: affine transform smooth jagged edges

Post by anthony »

Early versions of affine in IM v6 was very bad. Later versions a lot better, but still used the -draw affine functions. Recent versions now call the -distort affine to do the job and as such is controllable with the same -distort settings for -filter -interpolate (when enlarging or -filter point), -virtual-pixel, and the other special -set controls.

See the links previously given for -distort affine.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gmanojbabu

Re: affine transform smooth jagged edges

Post by gmanojbabu »

Thank you.
I got it.
Now i am using distort SRT which work as i wanted.

:)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: affine transform smooth jagged edges

Post by anthony »

Yes I find it is easier to handle most affine distortions with SRT.

Though for some situations a two or three control point affine distortion is better. Two point affine is equivalent to SRT, just different argument input.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply