Oracle ORDImage processing in PL/SQL: Getting IMG-00710 and ORA-01031
Question
I have loaded image into a new, initialized Oracle ORDImage object and am processing it by PL/SQL. I can read its properties, but cannot process it with the process() method.
vLocalImage ORDImage := ORDImage.init();
...
vLocalImage.source.localdata := PORTAL.wwdoc_admin.get_document_blob_content(pFile);
vLocalImage.setProperties();
...
if vLocalImage.width > lMaxWidth
then
vLocalImage.process('maxScale 534 401');
end if;
This should scale the image down, conserving aspect ratio, so that it is no more than 534 px wide and no more than 401 px high.
However, I get the following error stack:
Internal error: ORA-29400: data cartridge error
IMG-00710: unable to write to destination image
ORA-01031: insufficient privileges
Trying other operations (like 'rotate 90') gives same errors.
Solution
Even though the documentation states that it should be possible to edit an ORDImage "in-place", I was unable to make it work.
Instead, I created a new ORDImage object and used processCopy:
vNewImage ORDImage;
...
vLocalImage.processCopy('maxScale 534 401', vNewImage);
OTHER TIPS
Can you please show the select statement you use to get l_ordimage? The main cause of this error seems to be if you don't have "for update" in your select statement, but I can't get intermedia going at the moment to test.