How to set JPEG2000 quality for geoprocessor

Discussion created by ssstanton on Oct 25, 2011
Latest reply on Oct 26, 2011 by ssstanton
I'm using the ProjectRaster tool to re-project a JPEG2000 file, and noticed that the file size increased quite a bit (from 18Mb to 117Mb). I've tried using the GeoProcessor.SetEnvironmentValue method to make sure it uses JPEG2000 compression, but I'm not sure how to specify the quality value. Looking at some online help for scripting, it appeared that you can set the quality by appending a number to the compression type, so I tried the following:

Geoprocessor gp = new Geoprocessor();
gp.SetEnvironmentValue("Compression", "JPEG2000 50");

However my resultant file is the same size regardless of the number tagged on the end. Looking into one of the xml files that get produced alongside the resultant file, it does appear to have picked up the compression type. But there's no mention of quality. So is there some other way to specify it?

P.S. I've seen the IGPRasterGDBEnvCompression interface, but it would appear to relate to rasters in a GDB, and I'm only working with plain old files.