Why does image DPI impact image size in WebHelp transformation?

Post here questions and problems related to editing and publishing DITA content.
ann.jensen
Posts: 293
Joined: Wed Jun 17, 2015 10:19 am

Why does image DPI impact image size in WebHelp transformation?

Post by ann.jensen »

Hi,
I am playing around with the DPI values of my images in my topics as I need to transform to both WebHelp and PDF. They are all product screenshots captured from a web browser.
DPI of 300 looks great in PDF but it results in the image in WebHelp looking enormous. It doesn't seem to matter if I set scalefit or not.
Can anyone advise on best practices for capturing screenshot images to be used in both WebHelp and PDF.
I know I have about 18cm in real estate width in PDF but am not sure what I have with WebHelp.
Any advice appreciated,
Regards,
Ann
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Why does image DPI impact image size in WebHelp transformation?

Post by Radu »

Hi Ann,

From what I know the DPI information saved inside an image is only used for the PDF output. So when the image is displayed for example in a web browser it will always be displayed with the screen's DPI (probably around 100). And when you have huge images they will look huge in the web browser, no matter what DPI you save inside them.
Usually in cases with images having different sizes in PDF and XHTML-based outputs I recommend removing completely the DPI image from inside the image file using a free image editor utility like GIMP:

https://www.oxygenxml.com/doc/versions/ ... utput.html

which should make both images look the same in the PDF and XHTML outputs. After this, you can use the @scale attribute on the image to decrease its overall proportions.
But as we are talking about web-based publishing large images also take longer to load from the server so another workaround is to physically scale down the image in an image editor and make it smaller.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply