This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: image sizes
- From: Kevin Dunn <kdunn at hsc dot edu>
- To: docbook-apps at lists dot oasis-open dot org
- Cc: @hams-hsc.hsc.edu
- Date: Wed, 19 Feb 2003 10:33:37 -0500
- Subject: Re: DOCBOOK-APPS: image sizes
- Reply-to: kdunn at hsc dot edu
>Doug du Boulay <ddb at R3401 dot msl dot titech dot ac dot jp> writes:
>
>> I am using dsssl with openjade and the docbook stylesheets to render html and
>> with pdfjadetex to render pdf format.
>>
>> I would like to know what is the best way to control image sizes in both
>> output formats from the docbook markup.
>> HTML seems to accept
>> width="N" pixels
>> width="N%" percent
>> width="N*" relative dimensions
>>
>> These dont seem to be honoured by the tex output.
>> and specifying units of "Ncm" trashes the html output.
>>
>> what is the best strategy?
>
I store my original images as *.tiff files and then use ImageMagick to convert to (possibly lower resolution) png and jpg files for use in html and pdf outputs. For example:
High resolution file:
convert -quality 75 -density 300 srcimg/image.tif hrimg/image.jpg
Lower resolution file:
convert -geometry 48% -quality 50 -density 144 srcimg/image.tif lrimg/image.jpg
Since 144/.48 = 300, the image sizes are the same. Since the dimensions in pixels may differ from html to pdf, I leave the WIDTH and DEPTH attributes blank. You can choose any combination of density and geometry to get your files to be the proper size for html. I keep separate "versions" (lrimg, hrimg) of the graphics in separate directories and then just cp -R the appropriate directory to "images" before running openjade. My imagedata tags refer to all files as, for example:
<imagedata fileref="images/image.jpg" format="JPG"/>
--
Kevin M. Dunn
Professor of Chemistry
Hampden-Sydney College
--