How to show an ORDImage thumbnail without storing it ?

Hi,
I'm using Oracle 10g r2.
I need to show ORDImages (and BLOBs).
Here is my procedure that shows thumbnails :
create or replace procedure show_photo_thumbnail(v_id_photo in number, v_height in number, v_width in number) as
     obj ordsys.ordimage;
     obj2 ordsys.ordimage;
begin
     --obj2 := ordsys.ordimage.init();
     select phot_source into obj from photos where phot_id = v_id_photo;
     select phot_source into obj2 from photos where phot_id = v_id_photo for update;
     obj.processcopy('maxscale= '||v_width||' '||v_height, obj2);
     owa_util.mime_header(nvl(obj2.getmimetype(),'application/octet'), false );
     htp.p('content-length: ' || obj2.getcontentlength());
     htp.p('content-disposition: filename="' || obj2.source.srcname || '"');
     owa_util.http_header_close;
     wpg_docload.download_file(obj2.source.localdata);
     commit;
end;It works, but if I call this function repeatedly (from our apex application), the image quality becomes less and less good, it seems it processes always the same image.
And for example if I call show_photo_thumbnail(1126, 150, 150) and then show_photo_thumbnail(1126, 500, 500), it seems the 500 x 500 image is processed from the 150 x 150 thumbnail so the quality is very poor.
I read the entire documentation and I really don't understand why.
By calling this other procedure we can see that the content stored stay unchanged :
procedure show_photo_infos(v_id_photo in number, v_height in number, v_width in number) as
     obj ordsys.ordimage;
     obj2 ordsys.ordimage;
begin
     select phot_source into obj from photos where phot_id = v_id_photo;
     select phot_source into obj2 from photos where phot_id = v_id_photo for update;
     obj.processcopy('maxscale= '||v_width||' '||v_height, obj2);
     dbms_output.put_line('obj  : '||obj.getmimetype()||', '||obj.getcontentlength()||' bytes, '||obj.getwidth()||' x '||obj.getheight());
     dbms_output.put_line('obj2 : '||obj2.getmimetype()||', '||obj2.getcontentlength()||' bytes, '||obj2.getwidth()||' x '||obj2.getHeight());
end;
show_photo_infos(1126, 200, 200);
obj  : image/jpeg, 79754 bytes, 572 x 504
obj2 : image/jpeg, 4635 bytes, 200 x 176Any help would be much appreciated.
Thanks.
Yann.

It should work exactly the same for ORDimage and BLOBs, as ORDImage stores and updates the image content in a BLOB attribute.
The difference you are seeing might be because of which object you are reading. In the first example, obj2 was selected for update, but obj1 was not. So the local variable obj1 had the old data which was printed out, and this was different from the data in obj2, which had the changes that were updated in the table.
If you don't want to persist the updated image, then you can select for update, make changes as you are currently, but then rollback at the very end (after you download the content). Then the original image will be retained in the table and changes you made in this transaction will be discarded. The next time you run the procedure you will be operating on the original image.
I also notice you have a commit in the very first code snippet but not later. Depending on your logging settings that might be having an impact as well.

Similar Messages

  • How do I get my purchased movies from iTunes to show in my Library without storing all the GBs on my hard drive?  [I want to show the Cloud Purchases.]

    Hey Hey! 
    Running OSX 10.9.4 and iTunes 11.3
    I am pretty sure that this has been addressed somewhere, but I could not find it - so thanks up front!!!
    How do I get my purchased movies from iTunes to show in my iTunes Library without storing all the GBs on my hard drive?  I want to show the Cloud Purchases without having hundreds of GBs taking up my HD space. 
    Thanks!

    Deborah,
    You cannot import contacts from your Nano to your PC via iTunes.  The syncing process is only one way.  However, if you enable disk mode on your iPod, open it up in a Windows Explorer window, you should see a Contacts folder.  From there you can copy them back over to your PC. 
    Even though this article is talking about adding contacts to the PC, it should walk you through some of the steps mentioned above.
    http://support.apple.com/kb/HT2419?viewlocale=en_US
    B-rock

  • How to show whole slide thumbnail not cropped version

    A Keynote presentation is a custom 3:1 format how do i get the navigator to show whole slide thumbnail not a cropped version

    This is a bug/lack of functionality within Keynote 6. As of 6.5, there is no way to show the entire slide in the navigator view section if it's wider than 16x9.
    And for those curious, this was not an issue in Keynote 5.

  • How to show all fileds column without scroll the report output.

    Hi,
    In my report output shows few columns and need to scroll right to see rest of fields . but i want to see all columns without scroll to right side in output.
    Please guide me how to fix the fileds in report.
    Regards.

    Hello,
    Why dont you use WAD and then switch off these properties in Webitem paging properties.
    i think that would give you more flexibility with paging,scrolling but with some extra effort of creating a WAD
    waiting for your feedback
    Regards
    Nitin Bhat

  • How to show value of list from stored table

    How do you show the value of a list item stored in a table when
    a record is queried from a different table?
    ex:
    Using the Scott/tiger database. If you have a form that lists
    every employee(ENAME) one record at a time and there is a drop
    down list for the department(DNAME). How do you make sure that
    list (DNAME) changes to the correct value when you are
    navigating the employee records?

    use populate_group_form_query to create a group with the code
    and name. then populate the list with the group (populate_list).
    This should work automatically from this point.

  • How to show all days events without scrolling?

    I use iCal as a project program, and the projects run as all day events in the top. But it seems like the new iCal (I used version 4 before) doen't show all my all day events. I can only see 5 at a time, without scrolling. In the old iCal, the size of the window adapted the numbers of events.
    I really need some help here, to keep the overview on my all day events. I can't do that if I have to scroll!
    Hope someone can help me out :-)

    As you show days for any other year.
    Do you want to catch us on the fact year 1900 wasn't a leap year?
    Regards
    Etbin
    select to_date('1.1.' || :the_year,'DD.MM.YYYY') + level - 1
      from dual
    connect by level <= to_date('31.12.' || :the_year,'DD.MM.YYYY') - to_date('1.1.' || :the_year,'DD.MM.YYYY') + 1*** not tested ***
    Message was edited by: Etbin
    user596003

  • How to show a word document stored in a BLOB column?

    Hi guys.
    I'm trying to show the content of a MS Word document through forms 6i. This document was stored as byte-for-byte by an application developed in .Net to an BLOB column (oracle table). Anybody could help me in how to show this document using Internal Persistend LOBs and through forms 6i?
    I've been searching for it a lot of time without success...
    Thank you in advance.
    Alex.

    I've read about using the ole2 item, but I don't how to do it with BLOB files. I tried to use it and didn't work... I don't know if I've used it correctly or not. Could anybody give a sample, please?
    If anybody knows other way to do it, please send too.
    Thanh you,
    Alex.

  • How to show rating dots and file name underneath thumbnail in Bridge CS4 preview workspace?

    How to show rating dots and file name underneath thumbnail in Bridge CS4 preview workspace?

    Thank you! That was it. The option to change it is not available in preferences (though I believe it was in early CS versions). It's hidden in a dropdown menu associated with an icon at the top. It sure wasn't easy to find, and I probably would not have done so without your lead. Thanks again!

  • How to show modal window without popup in a web page using javascript

    Hi,
    How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
    pls help me.....

    Thanx for ur reply,
    Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page...

  • TS1538 Is there a fix for this? How can I get it to where my device will show up in itunes without having to reinstall itunes every single time?

    To get my Iphone 4 to show up in iTunes, I have to uninstall iTunes and then reinstall it EVERY single time I want to connect my device to iTunes. I've tried just using a wi-fi connection and that won't work. It's very annoying to have to go through all that trouble of uninstalling and reinstalling iTunes every time that I need to connect to my iTunes account. I first got this phone in Germany when I was visiting my uncle who was stationed there, he had got the phone from AT&T here in the U.S. while in Germany connecting to his computer to itunes was no problem, it'd connect without any issues. Then when I came home back to the states, my phone would no longer connect to itunes on my computer unless I unistalled and reinstalled, but my computer does recognize my device when I connect every time just itunes does not and I don't understand why it's doing that. Is there any way to fix this? How can I get my device to show up in itunes without having to reinstall it every time?

    The ipod is not a backup device.  The music sync is one way - computer to ipod.  the exception is itunes purchases.  Without syncing:  File>Transfer Purchases
    Copy everything from your old computer, or your backup copy of your old comptuer, to your new one.

  • How do I watch my iTunes movies, tv shows on my mac without having to download them all to my HD?  I really want my Mac to function like my Apple TV since I have just moved and don't have my TV for another few weeks. Help please?

    How do I watch my iTunes movies, tv shows on my mac without having to download them all to my HD?  I really want my Mac to function like my Apple TV since I have just moved and don't have my TV for another few weeks. Since I purchased my three Apple TV. I have had no need to download any of my movies to my Mac.  Which has been great.  However, I remember that I used to now have to do this... or did I?  I am just frustrated because I want to stream all this stuff vice haveing to waiting for it all to download fill up my Mac's HD and then just delete. Someone help please?

    Play the movie in iTunes to stream it.
    Click the cloud icon to download it.

  • I have deleted all my videos songs and photos from my iphone 4 but when i connect to itunes it still shows 17gb free. how can I solve this issue without restore. Total storage of my iphone is 32 gb.

    I have deleted all my videos songs and photos from my iphone 4 but when i connect to itunes it still shows 17gb free. how can I solve this issue without restore. Total storage of my iphone is 32 gb.

    I don't see an issue, but if you mean why didn't you get most of your memory back you need to see what else is using storage. Go to Settings/General/Usage. Wait a bit for it to calculate storage allocation, then when it finishes you can see how much storage each app uses.

  • How can I get photo of callers to vshow full page since I just did the update it doesn't show but a thumbnail pic

    How can I get photo of callers to vshow full page since I just did the update it doesn't show but a thumbnail pic

    That is the design in iOS 7.1 and there isn't any way to change it. You can provide feedback to Apple if you want: http://www.apple.com/feedback/

  • In disk utility, it shows that my external hard drive is somehow unmounted and I can't access it in finder or repair it in Disk Utility. How can I get this working without losing my important data?

    In disk utility, it shows that my external hard drive is somehow unmounted and I can't access it in finder or repair it in Disk Utility. How can I get this working without losing my important data?
    Thank you!

    When you erased the disk did you select Mac OS Extended Journaled as the format option?

  • How do i see what photos are stored in my icloud.  I cannot do this without installing 8.0 or above which i cannot do as i do not have enough space on my iphone.  I do not want to delete the pics to make enough room to install 8.0 without checking

    how do i see what photos are stored in my icloud.  I cannot do this without installing 8.0 or above which i cannot do as i do not have enough space on my iphone.  I do not want to delete the pics to make enough room to install 8.0 without checking first that the pics are saved.  Thanks

    Good day AMELIASARAH,
    One resolution to your issue would be to update your iPhone using iTunes on your computer rather than over the air. This requires much less space on the iPhone as most of the work is done by the computer. See this article for how to do it -
    If you need more space for an iOS update - Apple Support
    Thanks for using Apple Support Communities.
    Safe computing,
    Brett L 

Maybe you are looking for

  • HP Solution Center for 2 printers on Windows 7 64bit

    I have an HP Windows7 professional 64 bit laptop with a hp photosmart c309g and a Photosmart 7520 e all in one for wireless printers on our home network. the c309g shows up in the HP Solution Center, but the 7520 does not, so we are unable to set up

  • Adobe Reader 10.0.1 (AdbeRdr1001_en_US.exe)

    I am in the process of setting up distribution to upgrade the corporations systems with this version of Reader.  I am using SCCM to push it out, and so far this part is working.   What I am having difficulty with is setting the switch to turn off "Pr

  • Why is the filler content in the Templates in Pages 09' in Spanish?

    Well, I had this problem with my old, Mid-2011 27" iMac. I purchased and downloaded Pages 09' from the Mac App Store. Everything is fine, until I go into my templates when the application opens. If I select anything other than a blank, standard page,

  • Linking AP tables to GL tables

    Hi all, I have a few tables from Oracle E-Business Suite (AP, GL, PO) that I'm using for external analysis. I need to link between AP, PO, and GL, but can't figure the connection between AP and GL. The AP tables are check_stocks_all, checks_all, invo

  • Deploying simple website made up of JSF pages

    Hi all, I have made a simple website containig only JSF pages. But I could not able to deploy it on the oracle app server 10.1.3.0. At the time of deploying it is not showing any error message. But the website is not showing when I enter the given UR