OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK-APPS: image sizes



> >Doug du Boulay <ddb@R3401.msl.titech.ac.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.


> >> These dont seem to be honoured by the tex output.
> >> and specifying units of "Ncm" trashes the html output.

On Wednesday 19 February 2003 23:21, Adam DiCarlo wrote:
> I can't really answer that, and it probalby depends on whether your
> source image is resolution independent or not.  But if you send me
> some test XML files with examples of this I'm happy to try to fix the
> DSSSL bugs.

Sorry. Sloppy usage of the word "trash" on my part. What I should of said
was that using "Ncm" shrunk the html images smaller than a gnats ring.
I am certain the HTML was still well formed. 
Maybe cm units were replaced by pixels...?

> >>
> >> what is the best strategy?

On Thursday 20 February 2003 00:33, Kevin Dunn wrote:
> 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"/>
>

Thanks Adam, thanks Kevin. 
Actually I discovered that the stock dsssl1.77 stylesheets respond perfectly 
well to: 

<imagedata fileref="images/image.jpg" format="JPG" width="80%" scale="80">

The width attribute is only used by HTML and the scale attribute
(which is a percent without the % sign) is only used in the tex output.
All other image scaling attribute controls permitted by the DTD seem to be 
ignored by the dsssl stylesheets (obvious really, !).
What I dont know is what the widths and scales are percentages of. The 
original figures widths? the page width? the text-column width? 
I have no idea what magic goes on within web-browsers or tex  to impose this 
spec. 

For my current needs, image quality is not such a pressing issue. But I will
certainly keep the convert/resolution file replacement tricks in mind for 
future! Thanks again for your inputs.

Doug




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC