result.createGraphics().drawImage(image, 0, 0, Color.WHITE, null);
return result;
}
public byte[] getCustomAvatar(int xRatio, int yRatio, int width, int height, PictureMode pictureMode) {
PictureOriginal original = getOriginal();
BufferedImage image =
original.getPictureFileFormat() == ContentType.JPG ? Picture.readImage(original.getPictureData()) : read(original);
return processImage(image, xRatio, yRatio, width, height, pictureMode);
}