Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1.  
  2. # colorize.sh [color to change] [new color] [source image] [new image]
  3.  
  4. PNGA=`mktemp XXXX.png` || exit 1
  5. PNGB=`mktemp XXXX.png` || exit 1
  6.  
  7. #select color
  8. convert $3 -fuzz 50% -fill white +transparent $1 $PNGA
  9.  
  10. #convert color to new color
  11. convert $PNGA -colorspace gray $PNGA
  12. convert $PNGA -fill $2 -colorize 50 $PNGA
  13.  
  14. #compose
  15. convert -composite $3 $PNGA $4
  16. # colorize.sh [color to change] [new color] [source image] [new image]
  17.  
  18. PNGA=`mktemp XXXX.png` || exit 1
  19. PNGB=`mktemp XXXX.png` || exit 1
  20.  
  21. #select color
  22. convert $3 -fuzz 50% -fill white +transparent $1 $PNGA
  23.  
  24. #convert color to new color
  25. convert $PNGA -colorspace gray $PNGA
  26. convert $PNGA -fill $2 -colorize 50 $PNGA
  27.  
  28. #compose
  29. convert -composite $3 $PNGA $4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement