bThumb.getGraphics().drawImage(image.getScaledInstance(thumbWidth, thumbHeight,
Image.SCALE_FAST), 0, 0, thumbWidth, thumbHeight, null);
// Store image based on local of distributed files systems
FileSystem fs = ServiceLocator.getInstance().getFileSystem();
OutputStream oStream = fs.create(to);
ImageIO.write(bThumb, format, oStream);
try {
oStream.close();
}