// That's why, we need the scale the graphics to have a 50 PPC eps picture.
final double scale = 72. / PSTricksConstants.INCH_VAL_CM / IShape.PPC;// 72 DPI / 2.54 / 50 PPC
try(FileOutputStream finalImage = new FileOutputStream(file)){
final EpsGraphics2D g = new EpsGraphics2D("LaTeXDrawPicture", finalImage, 0, 0, (int)(getWidth()*scale), (int)(getHeight()*scale));//$NON-NLS-1$
g.scale(scale, scale);
g.drawImage(image, 0, 0, null);
g.flush();
g.close();
}
}