You can use the convert command from ImageMagick to separate JPG images into the R G and B fields easily:

convert -separate -channel R Im.jpg R.jpg
convert -separate -channel G Im.jpg G.jpg
convert -separate -channel B Im.jpg B.jpg