At first, everything seemed to be working great. However, one of my datasets seems to have a problem writing to JPG. The call to ISaveAs.SaveAs comes back with the error: esriDataSourcesRaster.GdalDriver - Failed to copy raster dataset - COM Errorcode -2147217383 [FDO_E_FEATURE_EMPTY_GEOMETRY].
However, it works if I save to PNG. It doesn't seem to relate to the pixel type (all the files I'm working with are PT_UCHAR). Any ideas?
For the record, it wasn't actually FDO_E_FEATURE_EMPTY_GEOMETRY - error code -2147217383 is also E_RASTER_FAILED_TO_COPY_DATASET (which makes a lot more sense).
Looking at archived forums, I see people were having this problem years back. No answer then, no answer now. In the end, I got around it by saving initially to a BMP file, then used System.Drawing.Image.Save to convert that to JPG.
The JPG format has some other limitations besides the bit depth. For example, you can only have 1 band or 3 band data and color maps are not supported. You can see that here. I don't know if your data has these kind of issues or not. Might help?