Hello I just need a simple sql or Pl/Sql code to insert images in a table test( id NUMBER, pic SI_StillImage );
And if possible i wanna add some fields by altering the table like adding SI_AverageColor, SI_Texture.
This may be very easy for some of you but i'm new to oracle!
Thanks in advance,
The images have to be loaded into the database first, perhaps to a BLOB column in a table. This table can be populated using SQL*Loader or using the DBMS_LOB API (please refer to the SQL*Loader or the SecureFiles and Large Objects documentation). Once a BLOB handle has been obtained by selecting a row from this table the SI_StillImage object can be created and loaded into a table as follows:
simage := SI_StillImage(myblob);
insert into test values(1, simage);
simage is of type SI_StillImage and myblob is the blob handle.
The table test can be altered to add new types as follows:
alter table test add avgcolor SI_AverageColor;
alter table test add texture SI_Texture;
Appendix I of the Oracle Multimedia Reference documentation contains details on various object methods and functions that can be used with these types.