Skip to content

Instantly share code, notes, and snippets.

@0xh3x
Created December 10, 2010 10:16
Show Gist options
  • Save 0xh3x/736052 to your computer and use it in GitHub Desktop.
Save 0xh3x/736052 to your computer and use it in GitHub Desktop.
Oracle Multimedia
declare
v_img1 BLOB;
v_img2 BLOB;
begin
select t.data into v_img1 from my_images t;
DBMS_LOB.CREATETEMPORARY(v_img2,TRUE, DBMS_LOB.SESSION);
ORDSYS.ORDIMAGE.processCopy(v_img1,'compressionFormat=JPEG compressionQuality=80 fileFormat=jfif',v_img2);
update rdd_doc_scans t set t.data=v_img2;
DBMS_LOB.FREETEMPORARY(v_img2);
exception when others then dbms_output.put_line(SQLERRM);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment