// _getImageEncoding() always returns non-null encoding
assert (encoding != null);
ImageEncoderManager manager =
ImageEncoderManager.getDefaultImageEncoderManager();
ImageEncoder encoder = manager.getImageEncoder(encoding);
if (encoder == null)
_error(_IMAGE_ENCODER_ERROR + encoding);
return encoder;