0 Replies Latest reply: Mar 29, 2010 9:22 AM by 759167 RSS

    WaterMark

    759167
      Hi, i've tried to use WaterMark function.
      I have an table Images.

      I have an images in my table, all seems to work.
      But when i'm trying to use the Function WaterMark with the following code :

      Set Serveroutput On;

      Declare
      Source_Image Ordsys.Ordimage;
      Added_Text Varchar2(200);
      Dest_Image Ordsys.Ordimage;
      Prop Ordsys.Ord_Str_List;
      Logging Varchar2(2000);
      Begin
      -- Select my picture to treat
      Select Image Into Source_Image From Images
      Where File_Name = 'souris';
      -- Select my picture to wite.
      Select Image Into Dest_Image From Images
      Where File_Name = 'souris2' For Update;

      Added_Text := 'GeR's test';

      Prop := Ordsys.Ord_Str_List(
      'font_name=Times New Roman',
      'font_style=bold',
      'font_size=50',
      'text_color=red',
      'position_x=10',
      'position_y=10',
      'transparency=0.6');

      -- add text watermark to source image
      Source_Image.Applywatermark(Added_Text, Dest_Image, Logging, Prop);
      Update Images Set Image = Dest_Image Where File_Name = 'souris2';
      Commit;
      Exception
      When Ordsys.Ordimageexceptions.Data_Not_Local Then
      Dbms_Output.Put_Line('source local data is null');
      When Ordsys.Ordimageexceptions.Null_Destination Then
      Dbms_Output.Put_Line('source local data is null');
      When Ordsys.Ordimageexceptions.Null_Local_Data Then
      Dbms_Output.Put_Line('source local data is null');
      When Ordsys.Ordimageexceptions.Null_Source Then
      Dbms_Output.Put_Line('source local data is null');
      When Others Then
      Dbms_Output.Put_Line('Autre');
      Raise;
      End;
      /

      all seems ok, but then it raised me an exception :

      Rapport d'erreur :
      ORA-29400: erreur de cartouche de données
      IMG-00002: erreur irrémédiable
      ORA-06512: à ligne 38
      29400. 00000 - "data cartridge error\n%s"
      *Cause:    An error has occurred in a data cartridge external procedure.
      This message will be followed by a second message giving
      more details about the data cartridge error.
      *Action:   See the data cartridge documentation
      for an explanation of the second error message.

      And i dont know what to do anymore.
      can somebody help me ?
      Thanks.

      Edited by: user4594913 on 29 mars 2010 07:21