Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Remove the background color from an image
- #get the color of the first pixel
- magick img.bmp -format "%[hex:p{0,0}]" info:
- #convert the image to a png
- #and use the color of the first pixel as the transparent color
- for img in *.bmp
- do
- echo "${img%.bmp}"
- magick "$img" -transparent "#%[hex:p{0,0}]" "${img%.bmp}.png"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement