I believe this is the solution to the issue of "stacking" layers or raster bands for multiple images. This model is set up using standard NAIP imagery so red=1, green=2, blue=3, NIR=4. In this example, I am taking only the three color bands from the original image--combining them--then converting the format to PNG. My model uses the same concept as the first model at the top of this post, only simplified.
Use these from the above post:
Iterate Rasters - Picks up all the rasters in a given work space
Parse Path - Set Parse Type to PATH and FILE
Calculate Value - Calculates Full Path to Raster Band. Set Data Type as Raster Band. For Band 3 - the expression would be something like this "%path%"+"\%FILE%"+"\Band_3"
Composite Bands - Pulls out individual Bands using paths from Calculate value
- To put quotes on expression for each band, exactly how its typed above.
- The order in which you connect each band to the composite bands tool, is the order it is stacked in the image. (Use preconditions to order them.)
- The parse path connecting the iterator name to the output is to carry the original file name to the output. (The model won't work properly without the precondition to the composite bands tool)
- Also, for the Iterator Parse path, select Name for parse type, or the original file extension will be included in the output name.