Store the Image in application process

Hello Friends
I am using 3.1 oracle apex.
I am trying to call the application process using javascript. but that time call the process But not store Photo(blob) data.
onchange ="getBLOB(this);"
in javasript
var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getBLOB',0);
ajaxRequest.add('P18_PHOTO',narrowText.value);
ajaxResult = ajaxRequest.get();
I Have write The Following process
DECLARE
v_blob1 blob;
v_blob2 blob;
v_id number;
l_photo blob;
l_thumb blob;
l_photo1 blob;
imagescale_width varchar2(20);
imagescale_height varchar2(20);
image blob; attributes clob;
img_mimeType varchar2(32);
img_width integer;
img_height integer;
img_contentLength integer;
fileFormat varchar2(32);
contentFormat varchar2(32);
compressionFormat varchar2(32);
begin
insert into test_vikas(ID)
values(1) RETURNING ID INTO v_id;
select BLOB_CONTENT into v_blob1 from apex_application_files where name=:P18_PHOTO;
UPDATE TEST_VIKAS SET PHOTO =v_blob1 where id =v_id;
UPDATE TEST_VIKAS SET THUMB =EMPTY_BLOB() WHERE ID=v_id;
select PHOTO,THUMB ,PHOTO into l_photo, l_thumb, l_photo1 from TEST_VIKAS where ID = v_id;
ordimage.processCopy(l_photo,'fixedScale=160 120',l_thumb);
UPDATE TEST_VIKAS SET THUMB =l_thumb WHERE ID=v_id;
DBMS_LOB.CREATETEMPORARY(attributes, TRUE, DBMS_LOB.CALL);
ORDSYS.ORDImage.getProperties(l_photo, attributes, img_mimeType, img_width, img_height, fileFormat, compressionFormat, contentFormat, img_contentLength);
if img_height >160 then
imagescale_height:='160';
else
imagescale_height:=img_height||'';
end if;
if img_width>120 then
imagescale_width:='120';
else
imagescale_width:=img_width||'';
end if;
ordimage.processCopy(l_photo,'fixedScale='||imagescale_width||' '||imagescale_height ,l_photo1);
UPDATE TEST_VIKAS SET PHOTO =l_photo1 WHERE ID=v_id;
exception when no_data_found then null;
END;

Hi
I hope these links will help:
http://help.sap.com/saphelp_crm60/helpdata/de/43/a996152ce41bbde10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_crm60/helpdata/de/36/844c5cb496dc428344d3ea4c46d3b0/frameset.htm
RP

Similar Messages

  • How to store the images in Oracle?

    Hi,
    I am a new developer, trying to find out how to store the images in Oracle. Is there anyway that I can store the images in Oracle and insert them into my html file?
    Thanks!
    Sarah

    There is a simple image example available from OTN.
    From the OTN main page, go to Products --> interMedia --> Sample Code. The name of the example is "Load rich media content with a browser."
    This example loads and retrieves an image from an Oracle8i database through a web page using the Oracle interMedia Web Agent.
    Hope this helps.
    null

  • How to store the images in tables

    how to store the images in tables .what is the use of "clob ,blob"

    Using with the CLOB or BLOB, you can store the images in the table.
    Srini C

  • How to store the images in KM using Code

    Hello,
    i retreived the images from KM using the following code.
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.resource.IResource;
    public class ThumbnailTes extends AbstractPortalComponent {
         /* (non-Javadoc)
    @see com.sapportals.portal.prt.component.AbstractPortalComponent#doContent(com.sapportals.portal.prt.component.IPortalComponentRequest, com.sapportals.portal.prt.component.IPortalComponentResponse)
         public void doContent(IPortalComponentRequest request,IPortalComponentResponse response) {
    String path =request.getResource(IResource.IMAGE,"images/sap1.gif").getResourceInformation().getURL(request);
                   response.write("<img src = "path"/>");
    but i want to store the images in KM using code.Can anybody help me.
    acutally the image is my location(c:/images/sap1/jpg).i want to upload this image to KM using code.
    Can anybody help me how to do that?

    Hi Kasturi,
    > not accepting the points
    It worked on this and on one other thread, but this is still open: How to upload the image
    > want upload the images from the client side machine
    > to KM
    In the thread I just referred to, I already provided information about the HTMLB upload control. With this at hand, you'll get the file from the client to the server.
    At server side, get an ICollection instance where you want to store the file and create the corresponding resource. See https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/javadocs/nw04/sp12/knowledge management/com/sapportals/wcm/repository/icollection.html#createresource(java.lang.String,%20com.sapportals.wcm.repository.IPropertyMap,%20com.sapportals.wcm.util.content.IContent)
    Hope it helps
    Detlev

  • Is it better to store the image in the database or to use BFile

    Hi all,
    I've a doubt regarding the handling of the image. For example i've the images of the persons amounting to 50,000(the number will be increased in future). So i just want to know which is the better menthod. is it better to store all the images in the database or to store in local OS and use Bfile concept. I'm using Forms 6i and Forms 10g(10.1.2.0.2). OS: Windows XP
    Regards,
    Alok Dubey
    Edited by: Alok Dubey on Nov 14, 2008 5:43 PM

    But the total number (i.e.., 50,000) is scaring me to use the BlobI don't think the database will cause problem just due to the amount of data stored in blobs. Of coure you would have to check which parameters to set for the blobs to make storage efficient. If
    You didn't mention your db-version, in 11G you could also think of using compression and deduplication to deal with the data amount.
    In general i agree with Francois, the best way depends, but in terms of data consistency and easy backup/restore there might be some advantages in using the blob-version.
    hope this helps.

  • How to store the image in CRM database

    Hi,
    We have requirement for storing the image in the database. User can brwse for image and store it to the database and shoud retrive it for display.
    Please need help , how to do this.
    Thanks,
    Sushant

    Hi
    I hope these links will help:
    http://help.sap.com/saphelp_crm60/helpdata/de/43/a996152ce41bbde10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_crm60/helpdata/de/36/844c5cb496dc428344d3ea4c46d3b0/frameset.htm
    RP

  • Store the image file

    hello friend
    i am using apex 3.1,
    i have one table that contain 6 blob column and others .
    In form when click on the save button then automatically store the This 6 images which is store in the desktop
    without browse , is it possible ? ,please let me know.
    regards
    vikas nagawade
    Edited by: विकास on Aug 22, 2011 4:57 AM

    Vikas-
    You can refer this
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    Hope this helps.
    Thanks,
    Greenhorn

  • How does a BufferedImage store the image?

    Hello
    I have to read the colors of different pixels in a BufferedImage which is bigger than 1800x1800 pixels. Im using getRGB(x,y) to get the pixels color. Is the image in the BufferedImage stored in its compressed form (png) and does it therefore always have to decompressed when i call getRGB(x,y)?

    Huttu wrote:
    Because there are several images for different purposes I store them in a zip-file. I load them using an ImageIO.read(zipFile.getInputStream(ZipEntry));I am totally out of my league here, but what if you create a BufferedInputStream with the inputStream obtained from the zipFile, and read with that?
    BufferedInputStream bis = new BufferedInputStream(zipFile.getInputStream(ZipEntry));
    ImageIO.read(bis);Again, this is a SWAG, so I have no idea if it will help or not. Also, I have not compiled or run this.

  • Any table stores the logs  of all processes

    Hi,
    Is there any table stores the logs of the process whether it is active/inactive/cancel/successful, etc

    Hi,
    not sure about your requirement, but may be table rspcprocesslog is of some help.
    regards
    Siggi

  • Where should I store the image file?

    I registered a schema, created a table, then inserted a XML file which contains following lines
    <material>
    <matimage imagtype="image/gif" uri="image2.gif">
    </matimage>
    </material>
    My question is where should I store this image2.gif so it can be displayed when my application retrieve this XML file?
    Thanks,

    In the XML DB repository.. See dbms_xdb.createResource().

  • I am trying to make an Edge Animation work on a CMS. I used "AdobeEdge.loadComposition" to find the .JS file, but it is looking for the images in the "/image" folder. I would like to store the images in another place. Please help me accomplish this.

    Here's the code:
    <script type="text/javascript" charset="utf-8" src="http://animate.adobe.com/runtime/5.0.1/edge.5.0.1.min.js"></script>
    <style>
        .edgeLoad-EDGE-4084323 { visibility:hidden; }
    </style
    <script>
       AdobeEdge.loadComposition('/media/products/edge_script/channels', 'EDGE-4084323', {
        scaleToFit: "none",
        centerStage: "none",
        minW: "0",
        maxW: "undefined",
        width: "361px",
        height: "268px"
    }, {"dom":{}}, {"dom":{}});
    </script>
    <div align="center">
      <div id="Stage" class="EDGE-4084323">
      </div>
    </div>
    Thank you for your help.

    Ahhhhhh, ok. Figured this one out after digging more.
    Here's the answer from another post. Hope it helps someone!
    If you need to set an absolute folder url, or you are pulling the content from a server that does not host the content, you can manually update the <projectname>_edge.js file to specify the directory:
    (function($, Edge, compId){
    //images folder
    var im='<SERVER/FOLDER>/images/';
    Just beware that if you re-publish the files, you'll need to redo any custom modifications.  I do this for off-server projects and it works very well so long as you make all the changes in each JS file where you need to specify the exact path.

  • Download/Display the image files stored at KM location: J2EE application

    Hi All
    Please let me know how to download/Display the image files stored at KM location on portal using J2EE application. Thanks.
    Best Regards
    P M

    You can use a servlet to deliver the image data to the <img tag, which allows you to get the data from something other than a file on the server (e.g. store the image data as a session attribute with a generated attribute key, the key being given in the serlvet's query string).

  • How to import the image by using java application

    1.how to import the image by using java APPLICATION and display it on the textarea that you have been created.
    2.how to store the image into the file.
    3. what class should i used?
    4. how to create an object to keep track the image in java application.
    * important : not java applet.
    plzzzzzzz.
    regards fenny

    follow the link:
    http://java.sun.com/docs/books/tutorial/2d/images/index.html

  • Problem in saving the image into SQL database..

    Hello,
    In my application I have to save image file (say jpg) into the database and retrieve back and display it on the applet. I am through with grabbing the pixels of the image & sending the pixel array to the servlet but I am struck in how to store the image into the database and retrieve the same.
    Can anybody please help me in this regard... its really urgent...
    Thanks in advance
    Swarna

    Hello.
    I've been researching this problem (saving images in a MySQL database) in order to accomplish a task I was assigned to. Finally I was able to do it. I'd be glad if it will be of any use.
    First of all: the original question was related to an applet. So, the post from rkippen should be read. It says almost everything, leaving the code job for us. Since I managed to write some code, I'll put it here, but I'm not dealing with the byte transferring issue.
    To obtain a byte array from a file I'd open the file with FileInputStream and use a loop to read bytes from it and save them into a ByteArrayOutputStream object. The ByteArrayOutputStream class has a method named �toByteArray()� which returns an array of bytes (byte [] b = baos.toByteArray()) that can be transferred in a socket connection, as said by rkippen.
    My problem was to save an image captured by a web camera. I had an Image object, which I converted into a byte array and saved into the database. Eventually I had to read the image and show it to the user.
    The table in the MySQL database could be:
    CREATE TABLE  test (
      id int(11) NOT NULL auto_increment,
      img blob NOT NULL,
      PRIMARY KEY  (id)
    )I had problems trying to use the �setBlob� and �getBlob� methods in the Statement object, so I used the �setBytes� and �getBytes� methods . In the end, I liked these methods most because they where more suitable to my application.
    The database operations are:
        public int insertImage(Image image) throws SQLException {
            int id = -1;
            String sql = "insert into test (img) values (?)\n";
            PreparedStatement ps = this.getStatement(sql);  // this method is trivial
            byte [] bytes = this.getBytes(imagem); // * see below
            ps.setBytes(1, bytes);
            ps.executeUpdate();
            id = ps.getGeneratedKeys().getInt(0); //Actually I couldn't make this line work yet.
            return id;
        public Image selectImage(int id) throws SQLException {
            Image img = null;
            String sql = "select img from test where id = ?\n";
            PreparedStatement ps = getStatement(sql);
            ps.setInt(1, id);
            ResultSet rs = ps.executeQuery();
            if (rs.next()) {
                byte [] bytes = rs.getBytes(1);
                img = this.getImage(bytes); // * see below
            return img;
        }* If the bytes are read directly from a file, I think it is not necessary to convert it into an Image. Just send the bytes to the database method would work. On the other hand, if the image read form the DB will be written directly into files, the bytes obtained from rs.getBytes(1) would be enough.
    The image operations are:
        public byte [] getBytes(Image image) {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            try {
                ImageIO.write(this.getBufferedImage(image), "JPEG", baos);
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            return baos.toByteArray();
        public Image getImage(byte [] bytes)  {
            Image image = null;
            ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
            try {
                image = ImageIO.read(bais);
            } catch (IOException ex) {
                throw new RuntimeException(ex);
            return image;
        public BufferedImage getBufferedImage(Image image) {
            int width = image.getWidth(null);
            int height = image.getHeight(null);
            BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
            Graphics2D g2d = bi.createGraphics();
            g2d.drawImage(image, 0, 0, null);
            return bi;
        }That's it. I hope it is useful.

  • Need to see the image in the oracle

    Hi
    i stored the image in one table and now i want to see that image from toad or any other tool
    please help

    What sort of column did you store the image in? One of the interMedia columns? A BLOB? A LONG RAW?
    You're probably not going to find a general-purpose application that is going to read data out of a binary column, figure out that it is an image, detect the encoding of the image, and display it. If you're storing things in an ORDImage column, there are probably some special-purpose data visualization tools. Generally, though, folks that store images in the database are writing applications that know how to extract and display those images.
    Justin

Maybe you are looking for

  • Mail App dead after Leopard upgrade + 10.5.6 update

    Has anyone else ended up with a dead Mail app after upgrading to Leopard and applying the 10.5.6 update? Mail app would appear to launch, but would not run or quit. Reinstalling the 10.5.6 combo update didn't help. I had to reinstall Leopard from scr

  • Apple's battery replacement = different ipod?

    Got a question about ipod battery replacement on Apple Care. Recently purchased two ipod classics, just before they were discontinued. The battery of one of them appears to be underperforming. I also have some older ipods that may need out-of-warrant

  • Problem with JTable.setDefaultRenderer()

    Hi, I try to set the default renderer of a table for Integer type in the following way: table.setDefaultRenderer(Integer.TYPE, new IntegerRenderer()); This line doesn't work. However the following line do work: table.setDefaultRenderer(new Integer(0)

  • ITunes and CDDB/Gracenote question

    I have searched on the forum everywhere but no helpful replies. My problem is I just bought a new computer and installed the new version of itunes and the updated software for the Mini. Upon inserting a CD into the computer, iTunes recognizes the CD

  • [REQUEST] smokinguns, smokinguns-data, smokinguns-mappack

    There already is a "smokinguns" package in the AUR, but it's a 32-bit binary and it's the same as the smokinguns-bin package, and unmantained. What's needed is a smokinguns package built from source, smokinguns-data and additionaly smokinguns-mappack