1

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?

APC
  • 144,005
  • 19
  • 170
  • 281
Pointer
  • 2,123
  • 3
  • 32
  • 59
  • It looks like that function came [from this dba.se thread](https://dba.stackexchange.com/a/207379/557). If so it's worth bearing in mind that the question was for Oracle 11gR2. I see you've tagged your question with `[oracle10g]` and `[oracle11g]`. Which one are you really using? – APC Aug 14 '19 at 13:46
  • @APC Tnx for replay, I use Oracle Database 19c but this tag is not visible here. – Pointer Aug 14 '19 at 16:44
  • For future reference it's better to state what version you're using in the question body rather than use misleading tags. – APC Aug 14 '19 at 16:48

1 Answers1

1

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.

kfinity
  • 8,581
  • 1
  • 13
  • 20
  • Tnx for answer, do you have any simple example how use SecureFiles LOBs and Piction? Or other solution for resize blob image. – Pointer Aug 14 '19 at 19:36