“Raster to other format” tool fails to convert ecw rasters of 4 bands to jpg,
I’m not sure if there is a tool that can convert ecw rasters of 4 bands to jpg.
Check Supported raster dataset file formats—Help | ArcGIS for Desktop - JPG only supports 1 or 3 bands. You could try JPEG 2000 or TIFF
If the issue persists, try to convert the ECW to a TIFF then convert the TIFF to a JPEG 2000. If I remember correctly, depending upon the ECW version, not all color maps are supported in direct ECW to JPEG 2000 conversion.
Also, make sure you are using 8-bit unsigned integer as your data type.
Thank you Lance Cole for the input.
Unfortunately, jpg2000 of 4 bands can’t be converted to jpg
Correct, JPG only supports 1 or 3 bands as noted in my original post. It does not support 4 bands. If you need to support 4 bands, you will need to work with TIFF or JPEG 2000 or convert using only 3 bands to use JPG.
Then how to convert the ecw of 4 bands to jpg (that only supports 3 bands)?
By the way, does converting a raster of 4 bands to 3 bands affect the visual context? Is visually a raster of 4 bands clearer than the one of 3 bands?
Good Morning Jamal,
You should be able to use the Composite Bands Tool (Data Management) to create a raster dataset containing subset of the original raster bands. I am currently working from a mobile platform so cannot create a walk through for you.
Most applications, such as ArcGIS, only display 3 of the 4 bands at any one time with multi-band imagery. Normally the 4 bands are based upon light wavelength of red, green, blue, and near Infrared or Infrared. If you look at Landsat imagery there are typically 7 bands or hyperspectral image can have many more bands in discrete wavelength groups. The default is to display RGB, typically bands 3, 2 & 1 but you can change this in your image settings depending upon what you are doing with your imagery. For example, if you replace your red band with the near IR band, the image will look nearly the same but bodies of water will be very dark and easy to identify. Here is a listing of Landsat band combinations just for reference.
I applied the “composite bands” tool and found out that it has nothing to do with the number of bands of a raster. The output is a raster of same number of bands.
I thought that this tool will convert a raster of 4 bands into a raster of 3 bands
You should be able to specify a subset of the original bands with Composite Bands. You may need to add each band to the tool or it may be in the Environment settings. I do not have access to ArcGIS today to provide more details and I am doing this from memory. You can also use Extract Bands Function (Desktop) or Extract Bands Function (Pro).
Not sure why the “extract bands” tool is not populated!
Follow-up. I revisited this post today as I needed to process some 4-band TIFFs to 3-band JPG and noted I never uploaded a screenshot clarifying utilizing the Composite Bands Tool (Data Management) with a subset of the original imagery bands. To complete this, one needs to add each required band to the tool rather than just the image itself, as depicted below. Although I am using a TIF, an ECW file would work the same way.
Additional parameters can be specified on the Environments tab, such as compression, reprojection, etc. Python or ModelBuilder can be utilized very efficiently if multiple files need to be processed.