7956 Posts in 1394 Topics by 945 members
|Go to End|
28 October 2010 at 9:24am
My client would like to be able to upload two images and have them combined into one. For example, two individual magazine pages combined into one spread.
I have all of the PHP written to do this, and would very much appreciate any advice on how/where to incorporate this into DOM/Uploadify workflow, of course, without touching the core of either.
I'm planning that there will be three db fields, 'image1', 'image2' and 'combinedImage' (something along these lines), so image1 and image2 are never destroyed. Then 'onSave', combine them into one image and save into the 'combinedImage' field.
Thanks in advance for your time.
28 October 2010 at 11:03am
I don't know where your two source images are coming from (are they part of the same DataObject)? A good place to do things like this would be in the onAfterWrite method of your DataObject.
To avoid rendering of the image every time you save the DataObject, you could compose the name of the image from the two IDs of the source images (eg. composite_idA_idB.jpg) and check if such a file already exists. If the file exists, you're done, otherwise the composite image doesn't exist yet and can be created.
28 October 2010 at 6:01pm
Thanks banal! Yes, both images are part of the same DataObject. That sounds like a good plan. Much appreciated.
|Go to Top|