Open zmoon opened 3 hours ago
I don't think we've tried one-band JPEG inputs for mrfgen. One-band grayscale PNG or TIFF inputs are okay, but not JPEG. I don't recall if there was a technical reason that it can't be supported or that we simply never came across it before. We can try removing the highlighted lines and do some testing.
Colormap is only needed when mrf_compression_type is set to "PPNG" (8-bit Palette PNGs). If you set mrf_compression_type to JPEG or PNG then it should produce a one-band grayscale MRF. What are you setting mrf_compression_type to?
https://github.com/nasa-gibs/onearth/blob/628ccc072c1dfe89f288bdf0aa084a590588d196/src/mrfgen/mrfgen.py#L1894-L1897
For my example I'm working, which @jtroberts helped with, I had to disable this check so my input files weren't skipped. But mrfgen seemed to work fine. My files for now are one-band grayscale instead of three-band RGB.
Some thoughts:
img.RasterCount
is 1 (or 3 if colormap is set)