Page 1 of 1

Load Images in HR Photo form...

Posted: Thu Jun 28, 2007 4:55 am
by jscrunch
Hi friends,
I'm trying to load/store a .jpg image.
In client/server mode, there's no problem (forms 6i) using this code in a button (i.e.):
-------------------------------------------
declare
dirname varchar2(255);
v_filename varchar2(255);
begin
tool_env.getvar('IMAGE', dirname);
dirname := 'C:\';
v_filename := get_file_name(dirname,NULL,
'Bitmap Files (*.bmp)|*.bmp|' ||
'JPEG Files (*.jpg)|*.jpg|' ||
'TIFF Files (*.tif)|*.tif|' ||
'CompuServe Files (*.gif)|*.gif|' ||
'PC Paintbrush Files (*.pcx)|*.pcx|' );

if v_filename is not null then
read_image_file(v_filename,'ANY','BLOCK.IMAGE_ITEM');
end if;
end;
--------------------------------------------------------
the image appears and is stored in database with good quality .
When we translate this to oracle applications world it changes: We can use this code (I'm looking for something similar,please post it here if you have) and.. I've seen and I've read that there exists a loss of quality for all the images we try to load/store through Forms methods. I've read in different metalink note that it's a bug and that it may be solve using Java Beans or something similar.. but.. I don't want to go so far ... do you know any way to avoid that loss of quality..? How do you load and store images from forms 6i in your application environment? (I'm trying to solve tihis problem for PERWSIMG.fmb , at Human Resources...
Thanks for your ideas &/or code.

Jose L.