String formatName = FileUtil.getExtension(fileName);
if (formatName.equals("")) {
formatName = DEFAULT_FORMAT;
}
ToneMapper toneMapper = toneMapperFactory.createToneMapper(image);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
CIEXYZ xyz = toneMapper.apply(image.get(x, y));
int rgb = xyz.toRGB().toR8G8B8();
bi.setRGB(x, y, rgb);
}
}