Pointer
Pointer

Reputation: 2186

Convert blob image to PUBLIC.ORDIMAGE in plsql

When I try to convert a blob image to PUBLIC.ORDIMAGE in plsql I get error

ORA-06512 ORDSYS.ORDIMAGE

insert into image(image) values (ORDSYS.ORDImage(blob_image));

I'm also trying to use a function to resize blob but get below error:

create or replace FUNCTION resize_img (p_ID  varchar)
   RETURN BLOB
IS
   vImageData     BLOB;
   vSizedImage BLOB;

BEGIN
  select blob_img into vImageData  from my_table where ID = p_ID;
  DBMS_Lob.createTemporary(vSizedImage, FALSE, DBMS_LOB.CALL);
  ORDSYS.OrdImage.processCopy(vImageData, 'maxScale=75 75', vSizedImage);
  return vSizedImage;

END resize_img;

When I call function I get error:

ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "ORDSYS.ORDIMAGE", line 456
ORA-06512: at "MYSCHEMA.RESIZE_IMG", line 14
06510. 00000 - "PL/SQL: unhandled user-defined exception"
*Cause: A user-defined exception was raised by PL/SQL code, but not handled.
*Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.

Any solution?

Upvotes: 1

Views: 3034

Answers (1)

kfinity
kfinity

Reputation: 9091

OrdImage is part of Oracle Multimedia, which was deprecated in 18c and removed in 19c.

As an alternative for image processing and conversion, Oracle recommends that you store multimedia content in SecureFiles LOBs, and use third party products, such as Piction. The ORDIM component remains in the registry and still has a VALID status. Oracle Multimedia objects and packages remain in the database. However, these objects and packages no longer function, and raise exceptions if there is an attempt made to use them. Oracle Locator is not affected by the desupport of Oracle Multimedia.

Upvotes: 1

Related Questions