Mobile app version of vmapp.org
Login or Join
Angela777

: Save for Web in Photoshop with custom DPI I am writing user documentation using DITA which allows me to easily generate deliverables in PDF, CHM and web formats. The images need to be saved

@Angela777

Posted in: #AdobePhotoshop #Dpi #ImageQuality #WebSafe

I am writing user documentation using DITA which allows me to easily generate deliverables in PDF, CHM and web formats. The images need to be saved with a DPI of 110 so that they are displayed correctly within the PDF documentation.

If I change the DPI of the image to 110 (without resampling) and save as a PNG or JPEG then this works fine with all outputs.

On average the image files are coming out with file sizes of between 50KB and 90KB. If I use the "Save for Web & Devices" feature of Photoshop the file sizes are reduced significantly to between 15KB and 40KB. So ideally I need to be saving files using this feature.

But... the DPI of the output file is changed to something else (I am guessing 72 DPI) which is causing the images to be scaled incorrectly by Apache FOP (for generating the PDF output). How can I change the value of the DPI metadata in the saved image files without loosing the ability to compress the files?

It might be possible to resolve this problem by altering some configuration or attriute of Apache FOP. I have posed the following question over at StackOverflow to find out: stackoverflow.com/questions/14342766/force-apache-fop-to-override-image-resolution

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela777

3 Comments

Sorted by latest first Latest Oldest Best

 

@Cofer715

I don't have any experience with it, but from the docs:


Some bitmapped image file formats store a dots-per-inch (dpi) or other
resolution values. FOP tries to use this resolution information
whenever possible to determine the image's intrinsic size. This size
is used during the layout process when it is not superseded by an
explicit size on fo:external-graphic (content-width and content-height
properties).


( apache fo docs )

So try setting the content-height and content-width explicitly.

Also: imagemagick has a -density switch to alter the DPI flag without resampling

( imagemagick docs )

10% popularity Vote Up Vote Down


 

@Cooney243

Unfortunately, Scott is right. Adobe has continued to leave the ppi at 72. This is a big limitation in the face of device proliferation. The concept of device central showed that Adobe had their head in the right place but they haven't kept pace.

One work-around I've used for multi-resolution output can be done in the Save for Web dialog. If you're working with vector art or source raster info in high enough resolution, you can resize the art on export with the image size settings. The ppi value will still be 72, but you can theoretically get your pixel dimensions right. A simple example is iOS devices that require an @2x version: Just scale up to 200%.

10% popularity Vote Up Vote Down


 

@Turnbaugh909

There's no method for altering the default PPI of Photoshop's Save For Web command. As you've discovered it's set to 72PPI (might be 96 on Windows).

The only way I'm aware you can get altered PPI png or JPG images is to use the Save As command, as you've discovered.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme