2009/10/26 Hannes Magnusson <hannes.magnus...@gmail.com>: > Shouldnt it fall back on getimagesize() if these options arent provided? > > This mail was sent from my HTC MAGIC. Sorry for any and all typos that may > have been in this mail. > > On Oct 26, 2009 10:38 a.m., "Richard Quadling" <rquadl...@php.net> wrote: > > rquadling Mon, 26 Oct 2009 14:38:21 +0000 > > Revision: http://svn.php.net/viewvc?view=revision&revision=289941 > > Log: > Fix bug#49925 : imagedata now supports width and/or depth (becomes width > and/or height) > > Bug: http://bugs.php.net/49925 (Open) PhD does not support width and depth > attributes for the <imagedata> element > > Changed paths: > U phd/trunk/package_generic.xml > U phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php > > Modified: phd/trunk/package_generic.xml > =================================================================== > --- phd/trunk/package_generic.xml 2009-10-26 14:14:58 UTC (rev 289940) > +++ phd/trunk/package_generic.xml 2009-10-26 14:38:21 UTC (rev 289941) > @@ -1,4 +1,4 @@ > -<?xml version="1.0" encoding="UTF-8"?> > +<?xml version="1.0" encoding="UTF-8"?> > <package xmlns="http://pear.php.net/dtd/package-2.0" > xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > @@ -47,6 +47,7 @@ > <license uri="http://www.opensource.org/licenses/bsd-license.php">BSD > Style</license> > <notes> > - Implemented PEAR request #2390: RSS feeds for PEAR Dcumentation Index > (Christian) > + - Fixed bug #49925 - imagedata now supports width and/or depth (becomes > width and/or height) (Richard Quadling) > </notes> > > <contents> > > Modified: phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php > =================================================================== > --- phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php 2009-10-26 14:14:58 > UTC (rev 289940) > +++ phd/trunk/phpdotnet/phd/Package/Generic/XHTML.php 2009-10-26 14:38:21 > UTC (rev 289941) > @@ -1299,10 +1299,11 @@ > public function format_imagedata($open, $name, $attrs) { > $file = $attrs[Reader::XMLNS_DOCBOOK]["fileref"]; > $newpath = $this->mediamanager->handleFile($file); > - if ($this->cchunk["mediaobject"]["alt"] !== false) { > - return '<img src="' . $newpath . '" alt="' > .$this->cchunk["mediaobject"]["alt"]. '" />'; > - } > - return '<img src="' . $newpath . '" />'; > + $width = isset($attrs[Reader::XMLNS_DOCBOOK]["width"]) ? ' > width="' . $attrs[Reader::XMLNS_DOCBOOK]["width"] . '"' : ''; > + $height = isset($attrs[Reader::XMLNS_DOCBOOK]["depth"]) ? ' > height="' . $attrs[Reader::XMLNS_DOCBOOK]["depth"] . '"' : ''; > + $alt = ($this->cchunk["mediaobject"]["alt"] !== false) ? ' ' . > $this->cchunk["mediaobject"]["alt"] : ''; > + > + return '<img src="' . $newpath . '"' . $alt . $width . $height . ' > />'; > } > > public function format_table($open, $name, $attrs, $props) { > > > -- > PHP Documentation Commits Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
I did think about that, but considering that the attributes are optional for both DocBook and HTML, always outputting them would seem to be redundant. Admittedly, dealing with all the conversion of different units of measurement isn't present. But it is a start. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling