tag:blogger.com,1999:blog-8449039.post112851885695604841..comments2024-03-28T05:59:36.577-04:00Comments on Scott Spendolini's Blog: Manipulating Images with the... Database?Scotthttp://www.blogger.com/profile/01187435106015051061noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-8449039.post-39147884689053290452014-07-07T05:47:26.823-04:002014-07-07T05:47:26.823-04:00Loved it! Great post!Loved it! Great post!Cristinahttp://glamorousoracle.blogspot.com.esnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-30245930346593134272013-09-29T10:24:19.192-04:002013-09-29T10:24:19.192-04:00Awesome. Thanks. I'd bee messing around wirh o...Awesome. Thanks. I'd bee messing around wirh ordsys.image for hours until I found your post. Your solution is a lot simpler!Philnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-53532928081721172702011-05-25T06:39:57.342-04:002011-05-25T06:39:57.342-04:00Very useful. Thanks Scott.Very useful. Thanks Scott.Raoulhttp://www.mraoul.comnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-8034323500143690632009-08-14T18:00:27.382-04:002009-08-14T18:00:27.382-04:00dlconsev@hacc.edu:
Instead of...
DECLARE
l_blob...dlconsev@hacc.edu:<br /><br />Instead of...<br />DECLARE<br /> l_blob BLOB;<br />BEGIN<br /> ...<br /> wpg_docload.download_file(l_blob);<br />END;<br /><br />Try doing this...<br />DECLARE<br /> l_ordimage ORDIMAGE;<br />BEGIN<br /> ...<br />wpg_docload.download_file(l_ordimage.source.localdata);<br />END;<br /><br />Worked for me.Bob Cnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-77845533350402867262009-07-13T22:56:16.580-04:002009-07-13T22:56:16.580-04:00trying to create(display) a link to BLOB on a page...trying to create(display) a link to BLOB on a page. But i do NOT want to use the report or form. HJEre is the discussion :http://forums.oracle.com/forums/thread.jspa?threadID=927593&tstart=0<br />Any ideas? thank you. AndrewAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-35919746494424513182009-03-27T10:35:00.000-04:002009-03-27T10:35:00.000-04:00Hi Scott!Your code is fantastic.I have a question:...Hi Scott!<BR/>Your code is fantastic.<BR/>I have a question: I print your report with Oracle BI Publisher, but if there is some image too large the report fails! how can I avoid this?Valeriahttps://www.blogger.com/profile/06461268269023737964noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-37304971847276459502008-09-15T22:07:00.000-04:002008-09-15T22:07:00.000-04:00Glad that it worked!- Scott -Glad that it worked!<BR/><BR/>- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-10403584848932752612008-09-15T19:29:00.000-04:002008-09-15T19:29:00.000-04:00You nailed it! I needed #OWNER#... and the PUBLIC ...You nailed it! I needed #OWNER#... and the PUBLIC grant.<BR/>Thank you. SteveAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-10656267350260280052008-09-15T07:46:00.000-04:002008-09-15T07:46:00.000-04:00Steve,When you call display_thumb, you will have t...Steve,<BR/><BR/>When you call display_thumb, you will have to prefix that with the name of your parsing schema. In APEX, you can use #OWNER# and it will automatically be replaced. <BR/><BR/>In addition to that, you will need to grant execute on that procedure to PUBLIC, so that it can be called from the URL.<BR/><BR/>Alternatively, you can call an APEX page that has a Before Header Process on it that calls just display_image; this is likely a better implementation, as you do NOT need any extra grants for it to work.<BR/><BR/>Thanks,<BR/><BR/>- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-42048037225257984042008-09-14T18:25:00.000-04:002008-09-14T18:25:00.000-04:00Hey Scott, old thread but still a good one. I'm t...Hey Scott, old thread but still a good one. <BR/>I'm trying to insert a blob image from a table into a pl/sql region. The image accompanies the text of a radio button. Here's what I'm doing so far:<BR/>string2 :='{input type="radio" name="aa" value="1"} '|| ltrim(a2.answer)|| '{img src= "display_thumb?p_file=a2.blob_id"/} {br /}';<BR/>htp.p(string2);<BR/>blob_id is the id# of the blob file. I'm getting a broken image symbol.<BR/>Any ideas? Thanks. Waiting for your book to arrive!<BR/>SteveAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-90004415670429705842007-10-03T09:54:00.000-04:002007-10-03T09:54:00.000-04:00Hi Scott, I like the example about ordimage.proces...Hi Scott, I like the example about ordimage.process but how do you get the image width for the blob?<BR/><BR/>Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-55636298895777268742007-06-12T06:39:00.000-04:002007-06-12T06:39:00.000-04:00Hi,First,esxcuse my english,I'm from a francophone...Hi,<BR/>First,esxcuse my english,I'm from a francophone country.It was helpful for me.<BR/>But I would like to know how to make appear the photo-name on the page 2,once I've clicked on the EDIT Icon on page 1.<BR/>Thanks.JF à Madahttps://www.blogger.com/profile/15140986696027455183noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-69340338220786856972007-06-06T22:57:00.000-04:002007-06-06T22:57:00.000-04:00Excellent.KishorExcellent.<BR/><BR/>KishorUnknownhttps://www.blogger.com/profile/17762368354241464743noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-49301926226878689182007-02-05T09:33:00.000-05:002007-02-05T09:33:00.000-05:00I have another procedure that creates a word docum...<i>I have another procedure that creates a word document but I would like to include a call to my Images procedure in the Word Procedure.</i><br /><br />I do not think that this is possible using the methods outlined here.<br /><br />Thanks,<br /><br />- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-36975663636031118342007-02-01T16:33:00.000-05:002007-02-01T16:33:00.000-05:00Scott,
I did forget to grant execute to public on...Scott,<br /><br />I did forget to grant execute to public on my image procedure. My next question goes one step further. I have another procedure that creates a word document but I would like to include a call to my Images procedure in the Word Procedure. I cannot seem to get the img src right in my Word procedure. The word doc opens fine with other text but my image source seems to be screwy. <br /><br />The code I have in my WORD procedure for img src is:<br /><br /><br />"#OWNER#.image?document_id=46"<br /><br />---------------------<br />The word doc opens fine but I get a broken image displaying the following path:<br /><br />file:///C:/Documents and Settings/Justin/Local Settings/Temporary Internet Files/Content.IE5/MZ47MBU9/V('OWNER').image%3Fdocument_id=46<br /><br /><br />Any suggestions or is this even possible to pull images from the database? Thanks again for all the help.<br /><br />-JustinJustinhttps://www.blogger.com/profile/08112318867091102217noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-29431514527492440732007-02-01T16:14:00.000-05:002007-02-01T16:14:00.000-05:00You are genius!You are genius!Justinhttps://www.blogger.com/profile/08112318867091102217noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-61998361910546109662007-01-28T23:20:00.000-05:002007-01-28T23:20:00.000-05:00Justin,
Did you grant execute to public on your i...Justin,<br /><br />Did you grant execute to public on your image procedure?<br /><br />- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-69298403406246017722007-01-25T16:42:00.000-05:002007-01-25T16:42:00.000-05:00Scott,
I have tried your process to view thumbnai...Scott,<br /><br />I have tried your process to view thumbnails in a report and for the life of me can't get the thumbnails to display.<br /><br />I created the following procedure:<br /><br />create or replace procedure "IMAGE"<br />(document_id in Number)<br />as<br />l_mime varchar2(255);<br />l_length number;<br />l_file_name varchar2(2000);<br />lob_loc BLOB;<br />begin<br />select mime_type, blob_content, filename, dbms_lob.getlength(blob_content)<br />into l_mime, lob_loc, l_file_name, l_length<br />from project_document where project_document_id = document_id;<br /><br />-- Set up HTTP header<br />-- Use an NVL around the mime type and if it is a null, set it to<br />-- application/octect - which may launch a download window from windows<br />owa_util.mime_header(nvl(l_mime,'application/octet'), FALSE );<br /><br />-- Set the size so the browser knows how much to download<br />htp.p('Content-length: ' || l_length);<br /><br />-- The filename will be used by the browser if the users does a "Save as"<br />htp.p('Content-Disposition: filename="'||substr(l_file_name,instr(l_file_name,'/')+1)|| '"');<br /><br />-- Close the headersowa_util.http_header_close;<br />-- Download the BLOB<br />wpg_docload.download_file( Lob_loc );<br />end;<br /><br />I then included your test query modified to fit my code<br /><br /><br />The images do not display just get a bunch of red x boxes. Anything I am doing wrong???<br /><br />Thanks<br /><br />-JustinJustinhttps://www.blogger.com/profile/08112318867091102217noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1165328551406735132006-12-05T09:22:00.000-05:002006-12-05T09:22:00.000-05:00First of all, sorry about my english. I trying to ...First of all, sorry about my english. I trying to process an image in a after insert trigger, the reason is because I need to reduce the size automatically when someone upload the image to de database. But I recive this error: "IMG-00730: unable to process empty image". ¿Why? ¿It is posible to process an image in a after insert trigger or not? ¿anyone knows another way to do that?. Thank you. Juan Pablo from Argentine.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1163690342622163892006-11-16T10:19:00.000-05:002006-11-16T10:19:00.000-05:00almost helpful.I have a table where the image is s...almost helpful.<BR/><BR/>I have a table where the image is stored as an ordimage, not as a blob.<BR/><BR/>What do I replace the wpg_docload.download_file with ? It won't compile. Says PLS-00306: wrong number or types of arguments in call to<BR/> 'DOWNLOAD_FILE'<BR/>when I changed type from blob to ordimage. ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1152567495014456952006-07-10T17:38:00.000-04:002006-07-10T17:38:00.000-04:00When you select lets say 400x500 proportionate.. d...<I>When you select lets say 400x500 proportionate.. does it save it smaller in "file size" than if you upload it as 700x900 ?</I><BR/><BR/>Yes - it will reduce (or increase) the file size when changing the proportions. This is a useful function to prevent large images being uploaded.<BR/><BR/>Unfortunately, the entire image has to be initially uploaded before the size can be manipulated.<BR/><BR/>Thanks,<BR/><BR/>- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1152567248386097192006-07-10T17:34:00.000-04:002006-07-10T17:34:00.000-04:00Hi Scott! The sample app works great!Downloaded it...<I>Hi Scott! The sample app works great!<BR/>Downloaded it and created the DDL but I get an error:<BR/><BR/>ORA-06550: line 8, column 1: PLS-00201: identifier 'ORDIMAGE.PROCESS' must be declared.<BR/><BR/>I asked our DBA about interMedia, he says it is installed.</I><BR/><BR/>You'll need to be sure that the schema which you are parsing your ApEx application as has execute on that package. Your DBA should be able to grant the appropriate privs to your schema.<BR/><BR/>Just having it installed is not enough.<BR/><BR/>Thanks,<BR/><BR/>- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1152567082117517262006-07-10T17:31:00.000-04:002006-07-10T17:31:00.000-04:00Hi Scott, When you select lets say 400x500 proport...Hi Scott, <BR/>When you select lets say 400x500 proportionate.. does it save it smaller in "file size" than if you upload it as 700x900 ?<BR/>Thanks, BillAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1152565372830028662006-07-10T17:02:00.000-04:002006-07-10T17:02:00.000-04:00Hi Scott! The sample app works great!Downloaded it...Hi Scott! The sample app works great!<BR/>Downloaded it and created the DDL but I get an error:<BR/><BR/>ORA-06550: line 8, column 1: PLS-00201: identifier 'ORDIMAGE.PROCESS' must be declared.<BR/><BR/>I asked our DBA about interMedia, he says it is installed.<BR/><BR/>Can I just load the needed procedures?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8449039.post-1137417390244060082006-01-16T08:16:00.000-05:002006-01-16T08:16:00.000-05:00Venkat,You cannot edit or display a BLOB inside a ...Venkat,<BR/><BR/>You cannot edit or display a BLOB inside a web browser if the type is not some sort of image. Your best bet is to let users open the BLOB in its native editor (Word for a .doc file).<BR/><BR/>Thanks,<BR/><BR/>- Scott -Scotthttps://www.blogger.com/profile/01187435106015051061noreply@blogger.com