Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> crop image in intermedia

crop image in intermedia

From: Michael Schulz <old_386_at_yahoo.de>
Date: Wed, 19 Nov 2003 19:18:51 +0100
Message-ID: <bpgc6d$1oh3oo$1@ID-181109.news.uni-berlin.de>


i have a problem with oracle intermedia. (9i)

i save in ora intermedia binary images (blackwhite with FAX4 Kompression) after i have the files in intermdia i crop and resize it. then i get the blob back and so ve it on the filesystem. to this i wrote a function in visual basic. but the colors in the image i get back are not correct. the risizing and the cropping are correct. what is my error:

here the function to return the blob:
--function
create or replace function exp_image(fid Number) return blob is
  ImageSource ORDSYS.ORDImage;
  ctx RAW(4000) := NULL;
  TheLocalQuest BOOLEAN;
  aBlob BLOB;
begin

   select thedata into ImageSource from tmp_img_merge where privid = fid;    aBlob :=ImageSource.getContent();
   return aBlob;
 commit;
end;
/

here the part of the procedure to crop an resize the image:

     IF RXUL = 0 AND RYUL = DYUL AND RXLR = DXLR AND RYLR = 0 THEN
       --theSrcImage.Copy(theNewImage);
       theCommand := 'scale='||tmpFinalScale;
       dbms_output.put_line('Command-String: '||theCommand);
       theSrcImage.processCopy(theCommand, theNewImage);
     ELSE
       theCommand := 'cut='||PXUL||' '||PYUL||' '||PW||' '||PH||'
scale='||tmpFinalScale;
       dbms_output.put_line('Command-String: '||theCommand);
       theSrcImage.processCopy(theCommand, theNewImage);
     END IF;

the result is: the pixels, in the input file white, are now black, and the pixels, in the input-file black are now white.

thanks for all of your help

michael



Michael Schulz, Schipkau OT Klettwitz
Phone: +49 162 4193841
mailto: micha.schulz1_at_epost.de Received on Wed Nov 19 2003 - 12:18:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US