Fix channel count when exporting RGB images

Fixes #12091, #11569.
Merge pull request #1175 from melissalinkert/rgb-export

Fix channel count when exporting RGB images in ImageJ