I'm creating a form with an image attachment section for a signature. I need to make this automatically resize the image to a set height/width. How do I do that?
Here's what I have (straight from the image attachment add-on) xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" class="fr-attachment" id="control-11-control" bind="control-11-bind"> <xforms:label ref="$form-resources/control-11/label"/> <xforms:hint ref="$form-resources/control-11/hint"/> <xforms:help ref="$form-resources/control-11/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> <xforms:filename ref="@filename"/> <xforms:mediatype ref="@mediatype"/> <xxforms:size ref="@size"/> </fr:image-attachment> </xhtml:td> </xhtml:tr> <xhtml:tr/> <xhtml:tr> <xhtml:td/> <xhtml:td> <xforms:input xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:fb="http://orbeon.org/oxf/xml/form-builder" Thanks in advance! Andrew |
Administrator
|
Andrew,
There is no built-in resizing facility in the XForms engine. Somehow you would have to hookup resizing code to achieve this. You could submit the image to a local service doing that, or call Java code. But it's not built-in. We have an Image Server processor which contains code that might be reusable: http://wiki.orbeon.com/forms/doc/developer-guide/processors-image https://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/processor/ImageServer.java -Erik On Mon, Aug 1, 2011 at 1:46 PM, atodeschini <[hidden email]> wrote: > I'm creating a form with an image attachment section for a signature. I need > to make this automatically resize the image to a set height/width. How do I > do that? > > Here's what I have (straight from the image attachment add-on) > > xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary" > class="fr-attachment" > id="control-11-control" > bind="control-11-bind"> > <xforms:label > ref="$form-resources/control-11/label"/> > <xforms:hint > ref="$form-resources/control-11/hint"/> > <xforms:help > ref="$form-resources/control-11/help"/> > <xforms:alert > ref="$fr-resources/detail/labels/alert"/> > <xforms:filename ref="@filename"/> > <xforms:mediatype ref="@mediatype"/> > <xxforms:size ref="@size"/> > </fr:image-attachment> > > </xhtml:td> > </xhtml:tr> > <xhtml:tr/> > <xhtml:tr> > <xhtml:td/> > <xhtml:td> > <xforms:input > xmlns:xbl="http://www.w3.org/ns/xbl" > > xmlns:fb="http://orbeon.org/oxf/xml/form-builder" > > > > Thanks in advance! > Andrew > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Resizing-Image-Attachment-tp3710758p3710758.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |