There are hundreds of tif files that have high volume and I want to reduce their size before inserting to database. How can I do? I tried the following function but file but The file disappeared after inserting and has no size
DECLARE
vImageData BLOB;
vSizedImage BLOB;
BEGIN
SELECT file_blob
INTO vImageData
FROM adoption_pix
WHERE ID = 529;
DBMS_Lob.createTemporary(vSizedImage, FALSE, DBMS_LOB.CALL);
ORDSYS.OrdImage.processCopy(vImageData, 'maxScale=75 75', vSizedImage);
UPDATE ADOPTION_PIX SET FILE_BLOB = vSizedImage
where id = 529;
EXCEPTION WHEN OTHERS THEN
dbms_output.put_line('Error Msg '|| SQLERRM);
commit;
END;
If this is a one-off task, easiest way would be to do it as OS leve.
1 Extract blobs to OS
2 Use something like 'ffmpeg' to resize them in batch
3 Load them back in