I have converted the rich text to image and saved as a blob to db. Blob is created fine from local server (WINDOWS) but when deployed to application server (LINUX). The image format(font, sharpness) got changed. I am not sure what I have to do. please shed some light. Here is code which I used.
BufferedImage image = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);
Graphics graphics = image.createGraphics();
JEditorPane jep = new JEditorPane("text/html", html);
jep.setSize(width, height);
jep.print(graphics);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image, "png", new File("C:\\Dev\\img8_TYPE_INT_RGB.png"));
ImageIO.write(image, "png", bos);
Which image format is good for text content?
Thanks in advance.
Image from Local server (WINDOWS)
Image from Linux server (application server) (Linux)