I obtain rare effect when I scale a image in imagemagick
I obtain rare effect when I scale a image in imagemagick
I scale this image with this command
convert img -scale 270% imgr
and I obtain this effect in the border
How I could convert i image without lose or change the colors
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: I obtain rare effect when I scale a image in imagemagick
try
Code: Select all
convert PaeLa.png -sample 270% result.png
Re: I obtain rare effect when I scale a image in imagemagick
this works very thankyou
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: I obtain rare effect when I scale a image in imagemagick
What is your IM version and platform? I do not get that effect even using your command:
Are you sure that is the command you actually used (not -resize nor -resample)
How did you view the result in zoomed view? What viewer? Perhaps your viewer is doing bilinear enlarging rather than pixel replication?
Code: Select all
convert PaeLa.png -scale 270% result.png
How did you view the result in zoomed view? What viewer? Perhaps your viewer is doing bilinear enlarging rather than pixel replication?
Re: I obtain rare effect when I scale a image in imagemagick
this is my version
Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-07-12 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-07-12 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
Re: I obtain rare effect when I scale a image in imagemagick
my command is scale my viewer is kolour paint (but i use a convert command for check the color and the color changed in the border too)
Re: I obtain rare effect when I scale a image in imagemagick
this is my result image using this command
convert img -scale 270% imgr
Code: Select all
convert img -scale 270% imgr
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: I obtain rare effect when I scale a image in imagemagick
Using IM 6.9.6.7 Q16 and IM 7.0.6.7 Q16 HDRI, I get your same result when using -scale when zooming a factor of 8. But using -sample works fine for me in both versions when zooming a factor of 8. Try -sample.
See
http://www.imagemagick.org/script/comma ... php#sample
http://www.imagemagick.org/script/comma ... .php#scale
If you were using an integer enlargement (200%, 300%, 400% etc), then both should produce the same results with no new colors.
I am not sure about non-integer enlargement values, but it was my understanding that both -scale and -sample enlarged with the same method. So if this is correct, then perhaps there is a bug. However, if I am wrong and -scale enlarges by non-integer values by blending, then this result is correct.
See
http://www.imagemagick.org/script/comma ... php#sample
http://www.imagemagick.org/script/comma ... .php#scale
If you were using an integer enlargement (200%, 300%, 400% etc), then both should produce the same results with no new colors.
I am not sure about non-integer enlargement values, but it was my understanding that both -scale and -sample enlarged with the same method. So if this is correct, then perhaps there is a bug. However, if I am wrong and -scale enlarges by non-integer values by blending, then this result is correct.
Re: I obtain rare effect when I scale a image in imagemagick
For your information V7 uses magick rather than convert. If you installed legacy programs convert will work but you will then be using a V6 version.
Re: I obtain rare effect when I scale a image in imagemagick
If you scale by whole integers 200, 300, and 400%, for example, no new colors are introduced. The scanlines are duplicated. However if you enlarge by a non-integer factor, new colors are introduced. Scanlines are blended. 270% is a factor of 2.7. So in the example you provide, new colors are expected.