Are you asking if you can expand 1 pixel from an image to make a new larger image from that pixel?
convert yourimage[1x1+xoffset+yoffset] -scale 100x100! newimage
or
conver yourimage -crop 1x1+xoffset+yoffset -scale 100x100! +repage newimage
Either will take 1 pixel at xoffset and yoffset from the top left and exand it to a new 100x100 image, all with the same color as the original image's single pixel that was selected
see http://www.imagemagick.org/script/comma ... ptions.php
and http://www.imagemagick.org/Usage/
as good reference pages
not sure about this question
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: not sure about this question
you can also do color maths like averaging two colors.
The above takes two colors from the second image and saves it into the single pixel first image. That image (the second is deleted automatically), is then scaled to the size wanted (ignoring aspect ratio).
Warning: if semi-transparency is involved the above averaging formular becomes a lot more complex as the colors also needs to be weighted by the amout of 'alpha' transparency is present in each color! The alpha value however remains a normal average.
Code: Select all
convert xc: rose: -fx '(v.p{40,30}+v.p{11,15})/2' -scale 150x100\! avg_color.png
Warning: if semi-transparency is involved the above averaging formular becomes a lot more complex as the colors also needs to be weighted by the amout of 'alpha' transparency is present in each color! The alpha value however remains a normal average.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/