Hi,
I have a DataObject, a DocumentObject, that contains many informations, but most importantly for my question : a File object (or more precisely a PDF object that restricts to pdfs and has a template) and an Image. I want the Image, a thumbnail actually, to be automatically generated from the document. I'm using imagemagick to do this.
For the moment, I'm generating the image and putting it in a predictable place and then find it... by knowing where it is. That's clearly not the proper way to do it, since I can't access SS gd functions or query any information from this image to use it dynamically in the template, etc.
I've been looking at the loadUploadedImage($tmpFile) function in Image... but haven't been sucessful in using it to join my generated image to the Image object (I'm guessing that's what it's for). For the moment, the image is generated in onBeforeWrite of the DataObject, I'm pretty that's where I must join it too.
So, do you have any experience in doing this or would you have any idea on the way to do it ?
Thanks.