Export JPEGs from blobs (not using interMedia)

I am storing JPEGs in blobs using the following stored procedure:
CREATE OR REPLACE PROCEDURE load_file (fname in varchar2, sp_id in varchar2, objectid in varchar2) IS
src_file BFILE;
dst_file BLOB;
lgh_file BINARY_INTEGER;
BEGIN
src_file := bfilename('CTEMP', fname);
-- blob reserve
delete from image_table where spill_id = sp_id;
INSERT INTO image_table (spill_id, rp_objectid, image) VALUES (sp_id,objectid,EMPTY_BLOB()) RETURNING image INTO dst_file;
-- lock blob for input
SELECT image INTO dst_file FROM image_table WHERE spill_id = sp_id FOR UPDATE;
-- file open
dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
-- length of file
lgh_file := dbms_lob.getlength(src_file);
-- input file
dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
-- update table
UPDATE image_table SET spill_id = sp_id, image = dst_file WHERE spill_id = sp_id;
delete from image_table where image is null;
-- Alle Files close
dbms_lob.filecloseall;
-- dbms_lob.fileclose(src_file);
COMMIT;
END load_file;
I need to export the JPEGs back out to .JPG files. How can I do that?
I am running Oracle 8.1.7 on Windows 2000.
Thanks
Dave

Here's how I'm doing it. We're using the web, so I'm just referencing this procedure as part of an <IMG SRC="||get_empimg?empno_in='nnnnnnn'> tag in HTML.
I'm storing our mime-type in the file, but you'd need to specify an "image/pjpeg" mimetype if you're not storing it on an image by image basis somewhere.
create or replace procedure get_empimg(empno_in number) as
vblob blob;
buffer raw(32000);
buffer_size integer := 32000;
offset integer := 1;
length number;
mimetype varchar2(40);
begin
select emp_pic, emp_pic_mime into vblob, mimetype
from web_emp_tbl
where emp_no = empno_in;
owa_util.mime_header(mimetype);
length := dbms_lob.getlength(vblob);
while offset < length loop
dbms_lob.read(vblob,buffer_size,offset,buffer);
htp.prn(utl_raw.cast_to_varchar2(buffer));
offset := offset + buffer_size;
end loop;
end;

Similar Messages

  • Exporting Jpegs from Lightroom - DPI question

    When I export Jpegs from Lightroom, I set the dpi to 300 pixels per inch. I do not specify a max width or height. When I view these files in Adobe Bridge (CS2 or CS3) the file info says 300dpi. However, when I open the files in Photoshop and select image size, It says 72dpi and has the document size set to very large. I realize that I can enter 300 dpi and uncheck the resample box, I am just confused as to why this is happening.
    My concern is, that I upload my images directly to my lab after exporting from Lightroom. Will this cause problems?
    Thanks in advance!
    David

    the image resolution is a combination of the two parameters you mention: size and dpi. a very large size at 72 dpi is equivalent to a small size (like 3x5) at very high dpi. for printing you want at least 240 dpi at the largest size that allows you to keep that resolution. for screen presentations or your web site you want jut 72 dpi. 72 dpi and 2x3 inches will require a very small file size.
    I suggest you to export images at TIFF and not JPEG as that will allow you to preserve the image quality when doing editing in PS.
    In my case I export TIFF for PS (when I need PS editing) and 72 dpi JPEG for my web site (that way if somebody downloads my image illegally thy get a poor resolution copy). But since LR works very well for me 90% of the images re just kept in raw mode and I print from LR.

  • Is it possible to export tables from diffrent schema using expdp?

    Hi,
    We can export tables from different schema using exp. Ex: exp user/pass file=sample.dmp log=sample.log tables=scott.dept,system.sales ...But
    Is it possible in expdp?
    Thanks in advance ..
    Thanks,

    Hi,
    you have to use "schemas=user1,user2 include=table:"in('table1,table2')" use parfileexpdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log{quote}
    I am not able to perform it using parfile also.Using parfile it shows "UDE-00010: multiple job modes requested, schema and tables."
    When trying the below, i get error
    {code}
    bash-3.00$ expdp directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=(\'MM\',\'MMM\') include=TABLE:\"IN\(\'EA_EET_TMP\',\'WS_DT\'\)\"
    Export: Release 10.2.0.4.0 - 64bit Production on Friday, 15 October, 2010 18:34:32
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Username: / as sysdba
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA directory=EXP_DUMP dumpfile=test.dmp logfile=test.log SCHEMAS=('MM','MMM') include=TABLE:"IN('EA_EET_TMP','WS_DT')"
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "MM"."EA_EET_TMP" 0 KB 0 rows
    ORA-39165: Schema MMM was not found.
    Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is:
    /export/home/nucleus/dump/test.dmp
    Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 1 error(s) at 18:35:19
    {code}
    When checking expdp help=y shows :-
    {code}TABLES Identifies a list of tables to export - one schema only.{code}
    As per few testing,tables from different schemas are not possible to export using expdp in a single command.
    Anand

  • Problem with exported jpegs from CS5 PSDs with transparent backgrounds

    I've detected an issue where when exporting jpegs from a CS5 PSD layered file with a transparent background, the jpegs don't have a pure white background (255, 255, 255). They seem to range from 250, 250, 250 to 253, 253, 253.
    LR3 with same export settings does not show this behavior--it's pure white: 255, 255, 255.

    Bill,
    Another very helpful solution and I appreciate knowing how to fix it in both applications. Thanks!
    Wolf

  • I am trying to print a color photo on my MacBook Pro from iPhoto (not using Photoshop) using Epson 2200 printer, and everything I do in the Color Matching and Print Settings results in a photo with a pink cast to it. What am I doing wrong?

    I am trying to print a color photo on my MacBook Pro from iPhoto (not using Photoshop) using Epson 2200 printer, and everything I do in the Color Matching and Print Settings results in a photo with a pink cast to it. What am I doing wrong?

    Have you checked the ink cartridges and made sure the nozzles are clear? Are you able to print from outside of iPhoto with the correct color?
    Try the following: make temporary copy of the library and do the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • Exporting JPEGs from InDesign CS4

    I've exported jpegs from InDesign CS4 for years and each time I get an Export JPEG dialog box that gives me the option to adjust the resolution. Suddenly, when I export to JPEG, I get no dialog box and it automatically creates a JPEG at 300 dpi. I've looked everywhere in Preferences to see if I inadvertently changed settings, but I find nothing. Help?

    Try this forums.adobe.com/thread/526990

  • My iPhone 5 does not allow me to send or recieve any texts from anyone not using iMessage - I've already checked my settings and everything is where it should be. Any other possible ideas?

    My iPhone 5 does not allow me to send or recieve any texts from anyone not using iMessage - I've already checked my settings and everything is where it should be. Any other possible ideas?

    Contact your carrier to make sure there's nothing wrong with your account.
    Also, it may be worth going into Settings>General>Reset and choosing Reset Network Settings. You'll lose saved wifi passwords but you won't see any other changes. That may resolve the issue.
    ~Lyssa

  • Lightroom 4.1 exported JPEG files are not recognized by Apple Preview App

    I just started using Lightroom 4.1 Trial version (coming from Aperture). I exported JPEG versions of some images using an ICC profile. On my iMac running Lion 10.7.5 the pictures do not show a thumbnail, the file on the desktop just shows "JPEG". I could not open the file with the Preview App, but I am able to open it with DPP (Canon software)? Also the file shows that it has 0 x 0 dimentions when I click Get Info even though it is about 25 Megs in size?
    The message I get is
    "The file “Edit-739820120223Canon EOS 7D.jpg” could not be opened.
    It may be damaged or use a file format that Preview doesn’t recognize."
    Does anyone know why this is hapening?
    Is it a know issue between Adobe and Apple?
    Is there a fix for this?
    Thanks for help in advance.

    25MB is quite a large filesize for a JPG, and this might be either quite a lot of pixels saved at a very "high" quality (not very much compressed), or it may be an extremely large number of pixels saved with medium compression.
    While the technical spec of the JPG format imposes an absolute limit on maximum width and height pixel dimensions, some software employs a lower limit above which it considers the file to be invalid. Different programs, different limits, sometimes.
    I have encountered this (for example) with pano stitched images using the full resolution of a large number of component shots - where JPG output could not be made, or if made, could not even be viewed as a whole by my standard image viewer (though TIFF was still OK even at still larger sizes).
    If Lightroom has been set to a large printed size AND to a high ppi resolution, it is easy to get into very high numbers and very large output files. One should IMO at least question the utility and benefit of using very high ratios of upsampling from a standard digital photo - which may happen in some cases as a result of using the same output settings regardless, when spreading the same data across both small and large scales. If the file that was imported into LR really does provide an unusually high number of pixels expressing lots of detail, then that will better deserve such a capacious output file. Otherwise, each part of the file may merely show a very highly detailed representation, of a very blurry nothing-much-in-particular.
    If the JPG has exceeded the viewer's size limits, a reported width and height of 0 may represent an error message, in effect - not actual reality.
    regards, RP

  • No exporting Jpegs from CS4?

    Is a windows bumpmap the only still image file I can export out of premiere CS4?
    CS3 could do jpegs I am pretty sure.
    I suppose it's not a big deal seeing as I can bring my .bmp files into photoshop and transcode them as jpegs....
    Why is CS4 so gimped on image exporting?
    thanks,
    Peter

    you can use AFTER EFFECTS if you want to export to PNG, BMP, JPG, TIFF, still image formats

  • Trouble exporting 320x240 from 720x480 sequence using QT conversion

    (Opps, put this on the FCP Express discussion 1st...)
    Hi,
    Everytime I try to export a 720x480 sequence from FCP with "using QT Conversion" to a 320x240 size, it exports out as 640x480. Everytime. Used to work just fine. Same thing happens using a compressor setting to 320x240 and exporting right from the QT export size setting. Anyone know what gives? I tried trashing prefs in both FCP and QT. No luck.
    Thanks!

    This is the first time I've heard of this problem so no real basis to go on. Try the QT prefs delete again and if not that, then the QT reinstall.
    To do a full quicktime reinstall.
    Go to /library/receipts and delete any files that say Quicktime followed by a number e.g. Quicktime703.pkg
    Go to the Apple quicktime site and download the appropriate version of Quicktime to your hard drive.
    Run the Quicktime installer.
    Repair Disk Permissions for your System Disk (Disk Utility > Select the system disk > Repair Disk Permissions)
    Reboot
    Good luck.
    x

  • NTSC to PAL - Export straight from FCP or use an mpeg file?

    I was reading this
    http://www.macworld.com/article/49306/2006/02/marchcreate.html
    however it does not mention what to bring into compressor.
    Should I export my ntsc sequence straight from FCP into compressor, or should I drag an ntsc mpeg file I aldeady made into compressor? Ive been trying the latter but can't do much as each step gives me the spinning beach ball for anywhere from 5 to 10 minutes. Thanks much.

    Yes, you should export directly from FCP Using Compressor. Exporting to a heavily compressed MPEG-file, and then converting that from NTSC to PAL makes no sense. You would want your video to go through as few conversions/generations as possible.

  • Upgrade agents from OEM 10.2.0.5 from 12c not using Upgrade Console

    Hi,
    As we have to upgrade more than 100 agents from OEM 10.2.0.5 to OEM 12.1.0.3, don't have oracle account passwords (OEM 10g agents are runing as the oracle accout), and PAM authentification is not working for our environnement (SR open) we want to know if there is a workaround for upgrading agents and not using the upgrade console.
    Regards,
    Nicolas

    Hi, the response from the support is upgrading all our agents to 11g and then upgrading to 12c it seems a bit complicated isn't it (more than 100 agents to migrate) ?
    And as the migrate from 10g to 12c is nothing more than many automated actions I can believe that it can't be done manualy (just the install and configure agants).
    Regards,
    Nicolas

  • Populate ComboBox from database - NOT using Flex Data Services

    Hi there,
    We are using CF with Flex but are not using the Flex Data
    Service. I'm very much a newb and I'm having trouble finding any
    information on how to populate controles from a database without
    using Flex Data Service. Any help would be greatly appreciated.
    First I have a page... JobSearch.mxml that contains a combo
    box that I want to populate with the job_id and job_title from a
    MSSQL database.
    In Flex in the RDS DataView I used the "Create CFC" Wizard
    which generated "job.cfc" and "jobGateway.cfc". It also generated
    "job.as".
    The CF Function that selects the data appears to be defaulted
    and called "load" and the .as function is called simply "job".
    So, that all looks great. But I can't find any information on
    what I need to have on my JobSearch.mxml to actually get this data
    into the comboBox.
    I did:
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var jobData:job = null;
    ]]>
    </mx:Script>
    And then:
    <mx:ComboBox
    text="{jobData.job_title}"></mx:ComboBox>
    But I'm being told "Type was not found or was not a
    complie-time constant: job"
    I guess I'm missing something, or doing something way
    wrong... I just don't know enough of Flex at this point to know
    what it is.
    Thanks!
    April

    Using php or asp is not an option, as we are a Cold Fusion
    House.
    I was looking at an article on Ben Forta's blog (
    http://www.forta.com/blog/index.cfm?mode=e&entry=1786)
    and following his example I did this... only it doesn't work:
    I'm very very new to Flash and we are using ColdFusion but
    are not using Flex Data Services. I've been trying to figure out
    how to populate a combobox from a database and I'm just not having
    any luck.
    My project is called "PreTraffic". I have my main file as
    "JobSearch.mxml" and a folder under the root named "cfc" with a
    file called "job.cfc".
    job.cfc contains the following code:
    <cfcomponent>
    <!--- Get jobs --->
    <cffunction name="GetJob" access="remote"
    returntype="query" output="false">
    <cfset var job="">
    <cfset var results="">
    <cfquery datasource="discsdev" name="job">
    SELECT job_id, job_title
    FROM job
    WHERE status = 'O'
    ORDER BY job_title
    </cfquery>
    <cfquery dbtype="query" name="results">
    SELECT job_title AS label, job_id AS data
    FROM job
    ORDER BY label
    </cfquery>
    <cfreturn results>
    </cffunction>
    </cfcomponent>
    And JobSearch.mxml has the following code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    layout="absolute"
    backgroundGradientColors="[#ffffff, #d0d0d0]"
    creationComplete="InitApp()">
    <mx:Style source="style.css" />
    <mx:Script>
    <![CDATA[
    public function InitApp():void {
    jobSvc.GetJob();
    ]]>
    </mx:Script>
    <!-- ColdFusion CFC (via AMF) -->
    <mx:RemoteObject id="jobSvc" destination="PreTraffic"
    showBusyCursor="true" />
    <mx:VBox label="Job History" width="100%" height="100%"
    x="10" y="92">
    <mx:Label text="Search jobs by"/>
    <mx:Form label="Task" width="100%">
    <mx:FormItem label="Job Name:">
    <mx:ComboBox id="jobNameCB"
    dataProvider="{jobSvc.GetJob.results}"></mx:ComboBox>
    </mx:FormItem>
    </mx:Form>
    <mx:HBox>
    <mx:Button label="Search"/>
    <mx:Button label="Clear"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>
    My Compiler thingy points to:
    -services
    "/Volumes/flexwwwroot/WEB-INF/flex/job-services-config.xml" -locale
    en_US
    and job-services-config.xml contains the following code:
    <destination id="PreTraffic">
    <channels>
    <channel ref="my-cfamf"/>
    </channels>
    <properties>
    <source>flex.pretraffic.cfc.job</source>
    <lowercase-keys>true</lowercase-keys>
    </properties>
    </destination>
    Well, when I run the app... the combobox is not populated...
    Can anyone help with what I've done wrong?
    Thanks!
    April

  • The Air Drop Icon is not available.  Cannot send or receive messages from anyone not using Messenger.

    I have checked to see that my iPad is using the latest software available and it is.  I have followed on-line directions to access Air Drop, but I do not have the Icon for it anywhere.
    I am not able to send or receive messages to anyone not using Messenger.  Thee Apple page says I should be able to.
    Any help appreciated.

    Yes, it is 2 questions. 
    My iPad is Model MC763LL/A - I hope that is the answer!  I do have Blue Tooth on.  I am not connected to WiFi, but am on Cellular Data here.  That should not have a bearing on the icon being loaded, should it?

  • Lightroom not exporting jpegs from a nikon d750?

    I know lightroom doesn't support the RAW files from the d750 but I understood it supports the jpeg files. However, when I go to export them it acts as if its doing it but it doesn't. I am doing everything as usual, but the picture does not come up when I am trying to export it to. I don't know what to do.

    However, when I go to export them it acts as if its doing it but it doesn't.
    Could you please explain this in detail? Exactly what do you see, exactly what happens? If there is an error message please quote the complete error message exactly as it appear, word-for-word, verbatim.
    Also, please let us know your export settings, perhaps a screen capture of the export dialog box File Sizing section. Thanks.

Maybe you are looking for

  • Itunes playlists no longer showing up in my 5th Gen 80GB ipod

    Ok, my ipod 5th Gen 80GB ipod works fine, all of my music is in there, and I can successfully sync with the latest version of itunes. The problem is: I can see my playlists in itunes on my laptop, I can sync my ipod successfully, but the playlists do

  • Error while installation of PI 7.1 in SUSE Linux 10 SP2

    Hi, While doing installation, i am getting the error as "At least version 2.4-1 of the saplocales package is required for SuSE Linux Enterprise Server 10. Current version: not installed. See also SAP Note 171356. Even when, i am trying to install the

  • Posted One-Time Ledger Re-appear in Plan Item

    Hi Expert, I have a contact with Actual Rental and One-Time Ledger Rental (dated 15.05.2007 with RM6000). The cash flow appear correctly (just appear actual rental) before i enter a new one time ledger rental. When i insert a new One-Time Ledger Rent

  • How to trim spaces in SQL?

    Hi there, I have installed Oracle XE on my machine and have populated it with some data. In one table,namely the Id column i noted there are spaces before the actual code. For example _ _ _12345. My question is, how do i removed these spaces? I am us

  • Implement Caching across multiple transactions in EJB3.0

    Hi, I need to implement caching of entities using JPA in EJB3.0. I am using Jboss 4.2.x for implementing this. The requirement is that the entities remain cached across different method calls. Regards, Deepak Dabas