Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rawtoppm -rgb 100 200 input.rgb > image.ppm
- ppmtorgb3 image.ppm
- tail +4 image.red > image_r.raw
- tail +4 image.grn > image_g.raw
- tail +4 image.blu > image_b.raw
- pgmtoppm red image.red > image_red.ppm
- pgmtoppm green image.grn > image_grn.ppm
- pgmtoppm blue image.blu > image_blue.ppm
- for ch in R G B; do
- convert -set colorspace RGB -size 100x200 -depth 8 rgb:image.rgb
- -channel ${ch} -separate -depth 8 gray:image_${ch}.raw
- done
- convert ... -channel RGB -separate gray:image_%d.raw
- # colorspace changes mean this works differently after ImageMagick-6.7.6
- convert -size 100x200 -depth 8 rgb:image.rgb
- -channel ${ch} -separate -depth 8 gray:image_${ch}.raw
- command /opt/ast/bin/cut -r3 -Nb1 < file > red
- command /opt/ast/bin/cut -r3 -Nb2 < file > green
- command /opt/ast/bin/cut -r3 -Nb3 < file > blue
- perl -F -ane '
- BEGIN{
- $/=3;
- map {open $f[$n++], ">", $_} qw{red green blue}
- }
- for $i (0..2) {print {$f[$i]} $F[$i]}'
- od -vAn -tu1 < file |
- tr -cs 0-9 '[n*]' |
- grep . |
- paste - - - |
- awk '{printf "%c", $1 > "red"
- printf "%c", $2 > "green"
- printf "%c", $3 > "blue"}'
- size=$(wc -c < file)
- convert -size "1x$size" -channel GB -fx 0 rgb:- rgb:- < file > red
- # ...and so on for green and blue
Add Comment
Please, Sign In to add comment