This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] simg:getWidth just returns $nominal.image.width


I think Norm will have to address this one.

It works for me.  I put similar <message> lines
into my process.image template, and my Saxon output
shows that simg:getWidth is working:

filename:      ./images/caution.png
img:new:       com.nwalsh.saxon.ImageIntrinsics@45eb
simg:getWidth: 24

My imagedata is just:

<mediaobject>
 <imageobject>
  <imagedata fileref="./images/caution.png" align="center"/>
 </imageobject>
</mediaobject>

I don't understand why it doesn't work for your system.

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

On Tue, Jul 22, 2003 at 10:24:01AM +0200, Sebastian Fey wrote:
> 
> 
> >On Mon, Jul 21, 2003 at 06:40:57PM +0200, Sebastian Fey wrote:
> >>
> >> i tried to use the variable $intrinsicwidth in graphics.xsl, but
> >> simg:getWidth just fills it with the value of its second param
> >> $nominal.image.width.
> >> ...
> >
> >
> >I presume you have fixed your earlier problem with
> >the CLASSPATH not finding the extensions file, so
> 
> yes :)
> 
> >that the simg:getWidth function is actually being used,
> >as your debug message indicates.
> >
> >It should work.  What kind of graphic format are you using?
> >It is possible that getWidth doesn't handle all graphics
> >file formats.
> 
> hi,
> 
> i now tried it with gif, jpg, png and wmf ... all return the same !
> 
> cu,
> -seb
> 
> this snippet:
> -------------
> 
> ..
> <xsl:when test="function-available('simg:getWidth')">
>   <xsl:message>
>     <xsl:value-of select="$filename" />
>     <xsl:value-of select="simg:new($filename)" />
>     <xsl:value-of
> select="simg:getWidth(simg:new($filename),$nominal.image.width)"/>
> ..
> 
> and this output:
> ----------------
> 
> ./figures/imajpg.jpg
> com.nwalsh.saxon.ImageIntrinsics@ce2187
> 540 (6 * pixels.per.inch = $nominal.image.width)
> 
> ./figures/imagif.gif
> com.nwalsh.saxon.ImageIntrinsics@141b571
> 540
> 
> ./figures/imapng.png
> com.nwalsh.saxon.ImageIntrinsics@1c5f743
> 540
> 
> ./figures/imawmf.wmf
> com.nwalsh.saxon.ImageIntrinsics@1bb60c3
> 540
> 
> with a .xml like this: (maybe imagedata with format-attr is needed? -we dont
> use it)
> ----------------------
> ..
> <figure id="FIG_Overviewofsystem">
> 	<title>Overview of the HTx&nbsp;4.2 system</title>
> 	<mediaobject>
> 		<imageobject>
> 			<imagedata fileref="./figures/imajpg.jpg" />
> 		</imageobject>
> 	</mediaobject>
> </figure>
> ..
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 
> 

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]