Hello,

I have a need to watermark JPEG images stored in RIFE's CMF on the fly.
 I currently have the non-watermarked version working well.  I have some
code which will do the watermarking, provided I can load up the image
byte data into a Java ImageIcon object in order to work with it.   At
the moment, I'm using 

manager.getContentForHtml

to get the CMF path for my images.  This generates a path of the form:

/sggis/content/historicsitesphotodata/411/image

which is piped through to the exit "serve_content" whose element
definition is:

<element id="serve_content" file="rife/cmf/serve_content.xml"
url="/content/*">
        <property name="datasource"><datasource><config
param="DATASOURCE"/></datasource></property>
    </element>

which obviously figures out where in the CMF PostgreSQL world the
actual image data comes from.  What I need to do is write a custom
element which extends the default behaviour in
rife/cmf/serve_content.xml.  This would take the same input, do my
watermarking and then output the binary results.  What I'm not quite
seeing is how I achieve this. I imagine I may have to copy the code in 

trunk/src/framework/com/uwyn/rife/cmf/elements/ServeContent.java

and write my own processElement() method which incorporates the
watermarking code? It seems though that I might actually have to extend
ContentManager as it's manager.serveContent() that finally outputs my
image data.  Am I on the right track here?  

I would ideally like to watermark my images before storing them, but
the table manager is a default RIFE/Crud implementation.  I am unsure
how I'd go about customising this to do the watermarking before storing
in CMF.

If there are better ways of achieving this, please let me know!

Thanks in advance for any help,

David Herbert
British Antarctic Survey.



--  
This message (and any attachments) is for the recipient only.  NERC is subject
to the Freedom of Information Act 2000 and the contents of this email and any
reply you make may be disclosed by NERC unless it is exempt from release under
the Act.  Any material supplied to NERC may be stored in an electronic
records management system.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to