For the most part, I think you will want to follow the procedure below:
1) Create [k,n,m] arrays of the images in the TIFF file. Where k is the number of bands, and [n,m] are the dimensions of the image.
2) Use WRITE_TIFF to write the first image to the file
3) Use WRITE_TIFF with the APPEND keyword to write the rest of the images to the file.
A brief example is shown below:
pro dj_forum_462017424
compile_opt idl2
read_jpeg, file_which('rose.jpg'), rose
;create no blue rose
rose_noblue = rose
rose_noblue[2,*,*] = 0
;create no green rose
rose_nogreen = rose
rose_nogreen[1,*,*]=0
write_tiff, 'test_tiff.tif', rose
write_tiff, 'test_tiff.tif', rose_noblue, /append
write_tiff, 'test_tiff.tif', rose_nogreen, /append
end
|