docs: private ImageWriteParam copyParams(final ImageWriteParam param, final ImageWriter writer) {
          if (param == null) {
              return null;
          }
  
          // Always safe
          ImageWriteParam writeParam = writer.getDefaultWriteParam();
          writeParam.setSourceSubsampling(param.getSourceXSubsampling(), param.getSourceYSubsampling(), param.getSubsamplingXOffset(), param.getSubsamplingYOffset());
          writeParam.setSourceRegion(param.getSourceRegion());
          writeParam.setSourceBands(param.getSourceBands());
  
          // Only if canWriteCompressed()
          writeParam.setCompressionMode(param.getCompressionMode());
          if (param.getCompressionMode() == ImageWriteParam.MODE_EXPLICIT) {
              writeParam.setCompressionQuality(param.getCompressionQuality());
          }
  
          return writeParam;
      }