invert image
Posted: 2011-05-04T12:46:58-07:00
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
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