Retrive image from image data

I am generating UI by mapping delphi form 2 java swing.
In delphi.dfm file for a picture some picture data is comming like this..
Picture.Data = {
07544269746D61704E310000424D4E3100000000000036040000280000009900
00004A0000000100080000000000182D00000000000000000000000100000001
0000FFFFFF000808080010101000181818002121210029292900313131003939
3900424242004A4A4A00525252005A5A5A00636363006B6B6B007B7B7B008484
84008C8C8C00949494009C9C9C00ADADAD00C6C6C600CECECE00D6D6D600DEDE
So suppose one picture is in the delphi form and i want to put that picture in my generated UI of java. how can i get the picture? is there any other way or i have to decode that picture.data and how? can any body help me?
thanks,
gantait

Well, this sounds like an interesting problem.. so I'll pitch in... I'd say EXPIRIMENT!!!
What?
Well what I mean is...
- Make a picture of size 3 wide by 2 high
- use simple colors... 2 or 3 only
- look at the Picture.data value
- if you have a string with 3 sets of 2 characters then your format is probably RGB, if 4 sets of 2 chars then it could be ARGB.
Example:
P.d = {0000FF0000FF00FF00FF0000FF000000FF00}
view as...
P.d = {0000FF 0000FF 00FF00 <next line> FF0000 FF0000 00FF00}
That has 6 pixel colors...
If you know how many pixels you have (6) then you can split the array by an even increment... so 36 characters divided by 6 pixels. Now you have 6 characters per color. So color in this case represents an RGB value. R = red (first set of two) G = green (second set of two) B = blue (third set of two)
So just expiriment and find out the format thats being saved, tell me how it works out :)

Similar Messages

  • How to retrive images from data base

    I am facing problem to retriving image data from
    DATABASE
    and how can i so that retrived image into web page
    plz help me

    Look at the URL below:
    How to store/retrieve image to/from SQLServer
    http://www.java-tips.org/content/view/203/29/
    Example below fetch pdf doc from database and show in browser, in order to show image the only difference would be setting the content type to
    response.setContentType("image/jpeg");
    How to view XLS documents loaded from database in the web browser
    http://www.java-tips.org/content/view/844/29/

  • How can I get the image data from Clipboard with LV

    Anybody knows How can get the image data after pressd "print screen button" with LV?
    I want to program a software which can save a image as a bmp or jpeg etc, and the image data is from pressed print screen button. 
    How to get it out from clipboard. I am trapping about. thanks in advance.
    Try to make everything Automatic

    You can have a look at Rolf Kalbermatter's post here (give him stars) or, if you're using scripting, you can use the Application class Get Clipboard Image method.
    Try to take over the world!

  • How do I load a picture from the clipboard (either Windows clipboard or Labview clipboard) into image data that can then be processed in Labview?

    I want to load a picture from the Windows clipboard (and if not possible, then from the Labview clipboard) into actual numerical image data so that it can be processed in lab view. When I'm at the main screen where I can add controls, I see a section of controls called "Vision" in the tool bar where all the different controls can can be added from. When I go to the control called "Image" and put that on my form, and then look at the flowchart/blockdiagram programing window to see what inputs and outputs it has, I only see one output, and no inputs. And when I right click on it, I see NO way to load an image into the Image control. PLEASE help me.
    Message Edited by Ben321 on 11-09-2008 04:32 PM

    Hi Ben,
    National Instruments has an image processing software called Vision and although I am not completely sure, I think the controls that you found in the control pallet are used in conjunction with the software. Depending on what kind of image processing you want to conduct in LabVIEW, you might want to consider purchasing that product.
    If cost is an issue, there are functions in LabVIEW which allows you to take in image files and process them. However, please keep in mind that the capabilities are limited.
    Images should be loaded onto LabVIEW not via the clipboard but through loading it from folders or directories. (There might be a way to and so if you find a way please let me know! I would like to know myself =D) If you open the function pallet by right clicking on the block diagram, in the programming folder you should find a directory called "Graphic and Sound". There, you'll find functions in which allows you to process images.
     In the "Graphic Type" directory there should be a function called Read JPEG file.vi. There are also others which allows you to read png and bmp files. Please note that there are functions which write as well. Set a file path on the block diagram and inside the "Grahic and Sound" there is a "Picture Function" directory and inside there, there should be a function called "Draw Flattened Pixmap.vi" That changes the image into a format where you can process on LabVIEW. Inside the "Picture Function" directory there are several functions which allows you to process the specified image. Play around with it and see how it goes. And don't forget to Write the file in the end to save any changes.
    I hope this helps
    National Instruments Japan
    Applications Engineer Taiki Hoshi

  • Import from Designer crashes with IMAGE data type

    Hello,
    I'd like to report an issue with Data Modeler while importing from Oracle Designer. If you consider this a bug, please let me know if I need to do anything else to request a fix for it.
    I've used the import > Oracle Designer Model tool to import an application model. The import runs fine for a while, then crashes with a message "There are errors in import - check log file".
    The application to be imported has 509 domains, 963 entities to import.
    The summary info displayed after the import (when I close the error message pop up) is:
    All statements: 1472
    Imported statements: 538
    Failed statements: 0
    Not recognized statements: 934
    The log file has the lines below:
    2011-04-28 10:55:46,505 [Thread-8] ERROR XMLTransformationManager - Unable to load object from XML: C:\Users\Beatriz\Documents\ODTUG\2011\SDDM designs\GAME\GAME\rel\0EEBE15E-D9EFB22E4D6B\subviews\02A206F8-0C6C-0DF9-E643-5919DBCB895A.xml
    java.io.FileNotFoundException: C:\Users\Beatriz\Documents\ODTUG\2011\SDDM designs\GAME\GAME\rel\0EEBE15E-D9EFB22E4D6B\subviews\02A206F8-0C6C-0DF9-E643-5919DBCB895A.xml (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at oracle.dbtools.crest.model.metadata.XMLToObjectTransformer.transformToObject(Unknown Source)
         at oracle.dbtools.crest.model.metadata.XMLTransformationManager.transformFromXMLToObject(Unknown Source)
         at oracle.dbtools.crest.model.metadata.XMLTransformationManager.openDesignPart(Unknown Source)
         at oracle.dbtools.crest.model.design.Design.openDesign(Unknown Source)
         at oracle.dbtools.crest.swingui.ControllerApplication$Recent$1.run(Unknown Source)
    2011-04-28 11:03:44,114 [Thread-12] WARN ODODomain - ODOType.initStructuredTypeAttributes() - Unable to find Logical DataType for: IMAGE
    2011-04-28 11:03:46,532 [Thread-12] ERROR ODExtractionHandler - Error during import from Designer Repository
    java.sql.SQLException: Numeric Overflow
         at oracle.jdbc.driver.NumberCommonAccessor.throwOverflow(NumberCommonAccessor.java:4380)
         at oracle.jdbc.driver.NumberCommonAccessor.getInt(NumberCommonAccessor.java:111)
         at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:928)
         at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:434)
         at oracle.dbtools.crest.imports.oracledesigner.logical.ODOEntity.generate(Unknown Source)
         at oracle.dbtools.crest.imports.oracledesigner.ODExtractionHandler.generateDesign(Unknown Source)
         at oracle.dbtools.crest.imports.oracledesigner.ODExtractionController$Runner.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)
    I see the issue with the IMAGE data type in the log. The model to be imported does have domains and entities using this data type. The domain actually did get imported, but it shows as "Unknown" logical type, even though there is an Image type available in the Data Modeler type list. None of the entities using IMAGE got imported.
    Please let me know if you can provide a fix or workaround for this (other than changing the format in Designer).
    Thank you,
    Beatriz.

    Hello Beatriz,
    definitely this is a bug. The problem with entities is not IMAGE data type it's supported there (it's overlooked for domains). The problem is volume information - Initial, Maximum, Average, Growth rate. No workaround for that.
    Domain can be changed manually if it's just one affected.
    Philip

  • Extract image data from a bitmap image in C# HELP Please!!

    Hi there, 
    I am trying to extract the image data from a bitmap file - i.e. delete the image's BMP header.
    But I keep getting an error (System.IndexOutOfRangeException) in line 85 (if I am not mistaken) inFilename = args[0];
    Where the Console Application just crashes. 
    https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(EHIndexOutOfRange);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true
    Any idea what is going wrong? 
    I thank you for your time and help in advance,
    IP
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ConsoleApplication1
    class Program
    private static string inFilename, outFilename;
    private static string errorMessage;
    private static void ShowUsage()
    Console.WriteLine("BMP2CSV by David Bolton. http://cplus.about.com (C) 2013");
    Console.WriteLine(@"Usage: bmp2csv input[.bmp] [output.csv]");
    Console.WriteLine(@"[means optional]");
    Console.WriteLine("Input extension must be .bmp, ouutput (if supplied) .csv");
    private static bool outputCsv(byte[] data, int width, int height)
    try
    using (var sw = new StreamWriter(outFilename))
    var ptr = 0;
    for (var y = 0; y < height; y++)
    var line = new StringBuilder();
    for (var x = 0; x < width; x++)
    line.Append(data[ptr++].ToString()).Append(',');
    sw.WriteLine(line);
    return true;
    catch
    Console.WriteLine("Error writing to " + outFilename);
    return false;
    private static bool ProcessFile()
    try
    using (var filein = new BinaryReader(File.OpenRead(inFilename)))
    var Signature1 = filein.ReadByte(); // now at 0x1
    var Signature2 = filein.ReadByte(); // now at 0x2
    if (Signature1 != 66 || Signature2 != 77) // Must be BM
    errorMessage = "Input File is not a BMP file";
    return false;
    filein.ReadDouble(); // skip next 8 bytes now at position 0xa
    var Offset = filein.ReadInt32(); // offset in file now at 0ea
    filein.ReadInt32(); // now at 0x12a
    var fileWidth = filein.ReadInt32(); // now at 0x16
    var fileHeight = filein.ReadInt32(); // now at 0x1a
    filein.ReadBytes(Offset - 0x1a); // should now be at offset bytes into file
    var data = filein.ReadBytes((int)filein.BaseStream.Length - Offset);
    // read remainder of file into data- array of bytes
    //Console.WriteLine("Data Length = {0}",data.Length);
    return outputCsv(data, fileWidth, fileHeight);
    catch
    errorMessage = "Error reading " + inFilename;
    return false;
    private static void Main(string[] args)
    errorMessage = "Ok";
    if (!ExtractParameters(args))
    return;
    if (!File.Exists(inFilename))
    Console.WriteLine("Cannot find file " + inFilename);
    return;
    if (ProcessFile())
    Console.WriteLine("file successfully processed - output in " + outFilename);
    else
    Console.WriteLine("File processing failed: " + errorMessage);
    private static bool ExtractParameters(string[] args)
    inFilename = args[0];
    var extension = Path.GetExtension(inFilename);
    if (extension.Length == 0)
    inFilename += ".bmp";
    else
    if (extension.ToUpper() != ".BMP")
    ShowUsage();
    return false;
    switch (args.Count())
    case 1: // No output filename so swap extensions
    outFilename = Path.GetFileNameWithoutExtension(inFilename) + ".csv";
    break;
    case 2:
    { // check outfiulename has no extension or a .csv only
    outFilename = args[1];
    extension = Path.GetExtension(outFilename);
    if (extension.Length == 0)
    outFilename += ".csv";
    else if (extension.ToUpper() != ".CSV")
    ShowUsage();
    return false;
    break;
    default: // no parameters? You get the usage message
    ShowUsage();
    return false;
    return true;

    You probably did not specify the command-line arguments, i.e. the name of input and output files. In order to do this in Visual Studio for debugging, see
    https://msdn.microsoft.com/en-us/library/vstudio/1ktzfy9w(v=vs.100).aspx. So type something like “C:\My Folder\MyFile.bmp” “C:\My Folder\MyOutput.csv”, including quotation marks, according to your real disks and paths.
    The program should be fixed to detect such errors and call
    ShowUsage. Maybe ask the author.

  • Using image data read out from a file

    Hi,
    Having used the GetBitmapFromFileEx(), GetBitmapInfoEx() to acquire the necessary image data (most of them is the .png format), then using the FileToArray() to put the image data in my own binary file, e.g., "mypicture.dat". My idea is that whenever need to use the image, I can read out it from mypicture.dat and then display it on a pcture control.  But when loading the image data to the memory, I have no idea to map the image data buffer to an image resource, which can let to acquire a bitmap ID.  Because from the  cvi's image processing function lists, it seems that must through such as  the GetBitmapFromFileEx(), GetBitmapFromFile() to acquire the image data buffer and the bitmap ID, then using SetCtrlBitmap() to diplay it. Is there any way to resolve the problem? Thanks.
    David 

    Well, to read and write raw data file informations from a PNG image you must adhere to this standard. As a source of informations you may take a look to this Wikipedia page and to the links in this page from the PNG Home site.
    So the problem is: does your application worth the effort to study this documentation?
    Edit: FYI part of this job has been already made in CVI by Guillaume Dargaud for his ReadSavePNG instrument driver. It's been a long time since I have used this instrument, as I/O operations on PNG files have been integrated into CVI since release 8 and support for JPEG files in release 7 or so. Nevertheless I saw functions in that instrument for accessing raw data in a PNG file so you may find them useful for your needs.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to change data format from [IMAQ create -- output -- New Image ] to [Unflatten Pixmap VI -- input -- image data]

    hi gays,
    i have two program,
    the first one use  {IMAQ create} to get a image from USB webcam,
    the second one is picture data process which use [Unflatten Pixmap VI] to get a image data from a BMP file.
    Now I want to combine this two program, but data format don't match between  the output of {IMAQ create} and the input of [Unflatten Pixmap VI].
    My LabVIEW version is 2009
    What can i do??

    Do you have VDM? Did you try "Image to array"?

  • How can i retrive image from sql database

    hi
    i have a problem.i want to retrive image stored in a table in binary form.how can i retrive the image from the table and show it in my page how can i do this? i have a sql database.plz help me out....

    hi
    my java file has compiled now i have made these changes plz see
         public InputStream getBinaryStream(String colname) throws Exception
              return rs.getBinaryStream(colname);
         public boolean GetSig() throws Exception
              boolean b=false;
              try
                   ps=myConn.prepareStatement("Select Sign from Signatures where Accode='1201780000000083' ");               
                   rs=ps.executeQuery();
                   b=true;
              catch(Exception e)
                   System.out.println("This is the problem"+e);
              return b;
    //          now how can i get it in my jsp page and disply the image in my page i am writing this code in the jsp file
    SIGN.makeConnection();
                                                      if(SIGN.GetSig())
                                                                while(SIGN.getNext())
                                                                               Stream Signatures=SIGN.getBinaryStream("Sign");
                                                                               System.out.println("Signatures is"+Signatures);
    %>
    <%=Signatures%>
    <%                                                                                                                                                                          }
                                                 SIGN.takeDown();
    %>
    this error is coming in the browser
    org.apache.jasper.JasperException: Unable to compile class for JSPD:\jakarta-tomcat-3.2.2\work\localhost_8080%2Fbackoffice\_0002fcdsl_0002fsignatures_0002ejspsignatures_jsp_0.java:96: Class cdsl.Stream not found.
                                                                               Stream Signatures=SIGN.getBinaryStream("Sign");
    plz see...i am waiting for reply

  • Move Image Data from Sql Server to Oracle

    I try to move Image data from a Sql Server Database to a Oracle Database.
    The dataType in Sql Server is Image and the target datatype in Oracle is BLOB.
    When I try to move my Sql Server data to Oracle I get the following error message
    Data Move information:Rows : 0 Errors: 76
    Commit failed: Getrennte Verbindung
    [InfogateSystem].[dbo].[ISErrorLogStepInfo] Getrennte Verbindung
    Anmeldung beim Server muß erfolgt sein
    [InfogateSystem].[dbo].[ISErrorLogStepInfo] ORA-00600: Interner Fehlercode, Argumente: [kokegPinLob1], [], [], [], [], [], [], []
    Getrennte Verbindung
    [InfogateSystem].[dbo].[ISErrorLogStepInfo] ORA-22275: invalid LOB locator specified Ungültigen LOB-Locator angegeben
    Inserting ' ' into column ISErrorLogStepInfo.ExtModulInfoSer (Row number 1)

    wow, you're getting a ora600 error here which is a bad sign for your database.
    I havent seen errors doing an online image data move, but I would diagnose the 600 error first and come back to us
    Barry

  • Displaying images from MySQL data base

    I'm currently developing a Master/Detail
    page set. The MySQL table containing the Detail information includes a 'blob'  (MIME: image/jpeg  - Attributes - BINARY) for storing a small image. Under phpmyadmin the images show where applicable.
    In my Detail page I display the results in a table. All the values display except the image.
    I selected Insert > Image
    When the 'Select Image Source' dialogue appeared set 'select file name from' to Data source
    Selected the data base field from the established records set
    I left the 'Format' as 'None'
    Clicked OK
    Have I omitted to set something? How does Dreamweaver or the PHP code know hto to render this field?
    Hope someone can make some suggestions to resolve this.
    Thanks
    Cliff
    Other possible useful info:
    Developing on Windows XP
    Dreamweaver CS5
    all versions of MySQL, PHP, Apache, IE8, Dreamweaver up to date.

    In my desparation this morning
    I even tried to set up a mirror of your example witha separate table (just the 3 fields) and even that didn't work. The Proxy member was the same as yours except that the script was changed to LocalPHP.php . Therefore I presume that the error must have been in the webpage. Unfortunately I've since deleted the code so I can't send a copy of what I used.
    The only suggestions I could suggest that may help others that are novices are (1) suggested code for the webpage (2) a diagram illustrating how the elements link or relate to each other. Hope that is thought helpful.
    Thanks again
    Cliff

  • Help! Read raw Image data from a file and display on the JPanel or JFrame.

    PLEASE HELP, I want to Read Binary(Raw Image)data (16 bit integer) from a file and display on the JPanel or JFrame.

    Hey,
    I need to do the same thing. Did you find a way to do that?
    Could you sent me the code?
    It's urgent, please.
    My e-mail is [email protected]

  • Read Binary(raw Image) data from a file

    Hi
    PLEASE HELP, I want to Read Binary(Raw Image)data (16 bit integer) from a file and display on the JPanel or JFrame.

    Hi, you'll need to use MemoryImageSource.
    You read each RGB triple and add it to a pixel[].
    Heres the roughg idea.
    Hope that helps.
    Harley.
    int width,height;
    int[] pixels = new int[width*height];
    while(!fileDone)
    for(int i=0; i<(width*height) i++){
    int rgb = inputStream.readInt();
    pixels[i] = rgb;
    DirectColorModel colorModel = new DirectColorModel(16,0xff00,0x00ff,0x00ff);
    MemoryImageSource memImage = new MemoryImageSource(width,height,pixels,0,width));

  • Image Date error on importing TIFF images from Disk

    I have thousands of high quality (~100 Mb each) images in 20 folders on a 1 Tb hard drive. I have been using Bridge to manage the images, adding some metadata such as keywords and copyright data. I am considering importing all these images into Aperture and using it as the primary image management tool.
    But I am concerned about an apparent bug in the way Aperture handles the "image date and time".
    In Bridge (and GraphicConverter), the "image date" field is correct, directly from my CFV digital back on the camera and inline with the time of day the shot was taken (e.g. sunrise image at 6am). When I import the image into Aperture, the time gets shifted by 14 hours.
    For example, an image in Bridge that correctly shows Date Created as 10/05/2009 7:36am gets distorted to 10/05/2009 9:36pm, exactly 14 hours later than the correct time. It was taken at 7:30 in the morning but, in Aperture, looks like it was taken in the late evening. It does not look like a time zone issue as the image was taken in the same time zone as my Mac Pro is set to.
    I have tried deleting the masters and re-importing them with GMT +2 and GMT -12 in the two time zone adjustment fields. This gets the right time into the Image Date field but then the image has the wrong time zone data in the "Camera Time Zone" and "Picture Time Zone" fields.
    I have tried running MetaData > Update Date and Time (with Master files ON) but it comes back with an error "no master files were adjusted ... because they have a format that does not permit modification".
    I have tried running MetaData > Update Date and Time (with Master files OFF). It appears to work but I assume that the underlying file in the Aperture library still has the incorrect time.
    Have others faced this problem? Is there a solution? Is it a known bug that Apple might fix one day?
    Regards
    Peter

    I am seeing a very similar problem when importing TIFF files back to Aperture.
    This is what I do and what I see:
    1. I import RAW images from my camera into Aperture. They show the correct date and time.
    2. I open an RAW image in Photoshop (CS4) directly from the finder. The image inside Photoshop (file/info) shows the correct date and time.
    3. After editing I save my image as 16bit TIFF and it still shows correct date and time.
    4. I import the new TIFF back into Aperture. The time is shifted back 15 hrs!
    I can then go in and Metadata/Update Date and Time (no masters) and it works well, but it is a pain to do on each image I process.
    In all cases camera and image timezone is set to US Pacific as it should be.
    To me this seems like Aperture is somehow miss-interpreting the timezone when reimporting TIFFs.
    I have not tried importing JPEGs or PSDs back but I will and will report back...

  • Why does Photoshop produce images that are from source data Photoshop can't read?

    I am getting this message "This image was generated from source data that Photoshop cannot read.  That data will be discarded."  When I open the image the data that has been discarded consists of the layers that were created in Photoshop.  I don't understand why Photoshop can't read data created in Photoshop.

    Thank you for the info.  I only have one version of Photoshop on my computer.  The one I created the images with won't open them.  However, I did have a version of Lightroom on my computer that I removed today.  It was newer than my version of Photoshop.  I am hoping that without Lightroom on my computer I will not have any more problems. (cross all my fingers)  The images that are corrupted are missing data.  The Metadata is missing and the layers are missing from the files. If the metadata is missing they won't open at all and if the layers are missing they will open up flattened, some of them are corrupted with data and color switched every which way in the image.

  • Want to store and retrived  images  in the BFILE format using inter media

    I want to store and retrived images in the BFILE format using inter media.I found a article in the oracle site that Oracle interMedia image supports BFILEs.But this article is not demonstrating the use of BFILEs.Please help me to findout the solution.
    Thanks in advance.
    null

    The advantage to using BFILE storage for your is that it's an easy way for Oracle
    Multimedia to access your images without importing them into the database.
    The disadvantages are that the images are read-only. If you want to scale an image or
    convert to a different format, you will need to create a destination image to hold the result. This
    will necessarily be a BLOB based image.
    Adding images is difficult to do from within an application program. Generally you would add new images to a file system that is accessible to the Oracle Database, then insert new rows in your table with appropriate BFILE pointers to the new images.
    BFILE images require separate backup from the database. Also there is not way to transactionally coordinate your BFILE data with your relational data.
    If you are using Oracle 11g, you can use the SecureFile option for BLOB storage. This is much faster then the previous BLOB storage (now called BasicFile) and much faster then BFILE also.
    That said, below is a code snippet that shows how to insert a BFILE based image, set it's properties, show it's properties and select the BFILE locator to access the content. You would need to use the DBMS_LOB package (in PL/SQL) to read the content. From other APIs, (e.g., Java) you would need to use the proper interfaces to access the BFILE.
    Note that you need change the USER, PASSWORD fields in the code. Also you should change the directory location and image name for your use.
    -- create a directory object indicating where the images are stored;
    create or replace directory imgdir as '/tmp';
    -- and grant permission to read to a user;
    grant read on directory imgdir to <USER>;
    conn <USER>/<PASSWORD>;
    -- create the images table
    create table images(id integer primary key, image ordsys.ordimage);
    set serveroutput on
    declare
    obj ordsys.ordimage;
    begin
    -- use the init('FILE', <SRC_LOCATION>, <SRC_FILE>) function
    -- to create an ORDIMAGE object with a BFILE source
    insert into images(id, image)
    values(1, ordimage.init('FILE', 'IMGDIR', 'wizard.jpg'))
    returning image into obj;
    -- lets see if the image source is local or not
    if(obj.isLocal()) then
    dbms_output.put_line('image source is local');
    else
    dbms_output.put_line('image source is NOT local');
    end if;
    -- set the properties of the image object
    obj.setProperties();
    -- and update the row
    update images set image=obj where id=1;
    commit;
    end;
    column height format 99999
    column width format 99999
    column mimetype format a30
    column length format 999999
    -- let's see what we have
    select t.image.getHeight() as "height"
    , t.image.getWidth() as "width"
    , t.image.getMimetype() as "mimetype"
    , t.image.getContentLength() as "length"
    from images t
    -- fetch a BFILE handle to the content
    declare
    bf BFILE;
    length number;
    begin
    select t.image.getBfile() into bf
    from images t
    where t.id=1;
    -- use the DBMS_LOB interface to find out size of image
    length := dbms_lob.getLength(bf);
    dbms_output.put_line('length of BFILE is ' || length);
    end;
    ---What we get when we run the code
    Connected.
    Directory created.
    Connected.
    Table created.
    image source is NOT local
    PL/SQL procedure successfully completed.
    height     width mimetype               length
    399     485 image/jpeg          92552
    length of BFILE is 92552
    PL/SQL procedure successfully completed.
    SQL>

Maybe you are looking for