Hi there,
is there a way to invert an image similar to the Photoshop command?
I have used the below command to create a difference mask:
convert whitebackground.JPG blackbackground.JPG -compose difference -composite \
-separate -background black -compose plus -flatten \
difference_plus.gif
The image that is produced looks to be a good mask to remove the background from and image. The only problem is that the areas of the difference_plus.gif that are white I want to be black and vice versa. When I invert the image in Photoshop I can then use it to remove the background from the white.JPG using this command:
convert whitebackground.JPG difference_plus.gif \
-alpha off -compose CopyOpacity -composite \
overlay_removed.png
Many Thanks,
Nik
invert image
Re: invert image
Perfect!!!!
Thanks Bonzo,
Nik
Thanks Bonzo,
Nik
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: invert image
IM Examples, Color Modifications (global), Negate
http://www.imagemagick.org/Usage/color_mods/#negate
http://www.imagemagick.org/Usage/color_mods/#negate
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/