Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> crop image in intermedia
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