Store and retreive image/bitmapdata to/from local storage in iOS-app

I'm trying to store and retreive cam-captured bitmapdata to the local app-space, but after a whole day of searching and trying I can't find any working example.
It's no problem capturing cam-bitmapdata, but how to store (and retreive).
Thanks!

If its just a problem of saving the bitmapdata, follow along:
http://actionsnippet.com/?p=1093
Use http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml#applicationStorageDirectory to resolve to the correct location.

Similar Messages

  • Can i store and retrieve image using sql command?

    hi
    the following is what i enter to store image in table using sql*plus
    however i encounter some errors as shown below.
    i wondered if i actually can use sql to store image and retreive image
    or i need other developer beside sql to do.
    create table img_storage
    (id     number primary key,
    image     ORDSYS.ORDImage);
    CREATE or REPLACE procedure ADD_image (tmp_id number, file_name varchar2)
    as
         obj ORDSYS.ORDImage;
         ctx raw(4000) := null;
    begin
         INSERT INTO img_classifier (id, image) VALUES (tmp_id,
         ORDSYS.ORDImage (ORDSYS.ORDSOURCE(EMPTY_BLOB(),
         NULL,NULL,NULL,SYSDATE,NULL),
         NULL,NULL,NULL,NULL,NULL,NULL,NULL));
         COMMIT;
         SELECT image into obj FROM img_storage
         where id = tmp_id FOR UPDATE;
         obj.importFrom(ctx,'FILE','IMGDIR',file_name);
         obj.setproperties();
         UPDATE img_storage
         SET image = obj where id = tmp_id;
         COMMIT;
    end;
    show errors;
    create or replace directory imgdir as 'c:\image\';
    exec add_image(1,'argvseng.jpg');
    BEGIN add_image(1,'argvseng.jpg'); END;
    ERROR at line 1:
    ORA-00001: unique constraint (SYS.SYS_C002717) violated
    ORA-06512: at "SYS.ADD_IMAGE", line 7
    ORA-06512: at line 1
    how to reslove the error as shown above.
    or sql does not support ordsys.ordimage such command.
    hmm very confused ....
    what is the difference bet using blob for image and ordsys.ordimage?

    This has nothing to do with intereMedia.
    This is a basic SQL issue.
    A primary key cannot have duplicate entries in a table as the error message suggests.
    Before you call your peocedure you can delete the row with 1 as the primary key, or call the insert peocedure using a primary key that is not being used.

  • 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>

  • To store and retreive imageicon form oracle

    i am able to store imageicon in oracle
    but not able to read back
    this is the part of code to store and
    retreive
    public void callupdatescreenview()
    try{
    SimpleDateFormat dateformat=new SimpleDateFormat("dd/mm/yyyy");
    Date date=new Date();
    String dat=dateformat.format(date);
    java.sql.Timestamp t=new java.sql.Timestamp(date.getTime());
    java.sql.Statement stmt,stmtdailyid;
    java.sql.ResultSet rs,dailyidrs;
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(bos);
    oos.writeObject(ilog.iImg);
    oos.close();
    byte[] data = bos.toByteArray();
    String dailyid=new String();
    String usrnm=new String();
    usrnm=(String)serverView.jcbusertimer.getSelectedItem();
    stmtdailyid=dbdeclare.serverdbcn.createStatement();
    dailyidrs=stmtdailyid.executeQuery("select tDate,usrName,noOfLogs
    from logInfo where tDate='"+dat+"'and usrName='"+usrnm+"' order by
    noOfLogs");
    while(dailyidrs.next())
    {  dailyid=dailyidrs.getString(1)+dailyidrs.getString(2)
    +String.valueOf(dailyidrs.getInt(3));     }      
    serverView.pstmtaddscreen.clearParameters();
    serverView.pstmtaddscreen.setString(1,dailyid);
    serverView.pstmtaddscreen.setTimestamp(2,t);
    serverView.pstmtaddscreen.setObject(3,data);
    serverView.pstmtaddscreen.executeUpdate();
    stmt=dbdeclare.serverdbcn.createStatement();
    rs=stmt.executeQuery("select * from capturescreen where
    dailyId='"+dailyid+" '");
    while(rs.next()) {
    ImageIcon i =(ImageIcon)rs.getObject(3);
    serverView.jlblimage.setIcon(i);
    catch(java.sql.SQLException sqle) { System.out.println(sqle);}
    catch(java.io.IOException sqle) { System.out.println(sqle);}

    You need an encoder. Take a look at these;-
    com.sun.image.codec.jpeg.*;
    com.sun.media.jai.codec.ImageCodec;
    com.sun.media.jai.codec.ImageEncoder;
    com.sun.media.jai.codec.PNGEncodeParam;
    com.sun.media.jai.codec.BMPEncodeParam;
    com.sun.media.jai.codec.TIFFEncodeParam;

  • I'm try to buy a movie from iTunes with my I pad 3 and it tells me there is not enough local storage and when I go to my local storage there is a lot on free storage I also restarted my ipad but still the same prob what do I do?

    I'm try to buy a movie from iTunes with my I pad 3 and it tells me there is not enough local storage and when I go to my local storage there is a lot on free storage I also restarted my ipad but still the same prob what do I do?

    5GB is typically not enough space to download a movie.  Often, movies take from 3 - 5 GB to begin with.  The only option you have is to delete more things from your iPad.  You can remove unused Apps, pictures, music, text message (messages with pictures can take up a lot of space), email messages, books, magazines etc.

  • I am trying to download xfinity tv go app. I can not find it in my App Store and can not download it from the comcast website. All I get is a blank screen in the App Store. My Apple ID is associated with a Canadian address. How can I find the app?

    I am trying to download xfinity tv go app. I can not find it in my App Store and can not download it from the comcast website. All I get is a blank screen in the App Store. My Apple ID is associated with a Canadian address. How can I find the app?

    Its possible the App is not available in the Canadian store if the link doesn't work for you.
    https://itunes.apple.com/us/app/xfinity-connect/id320788270?mt=8

  • Help abt store and delete images as blob & bfile using Visual C++

    Hi
    Does anyone knows if there is code for visual c++
    to store and delete images as blob or bfile?
    thanx

    The documentation states there are examples in the oracle database distribution: <ORACLE_HOME>/rdbms/demo/cdemolb.c <ORACLE_HOME>/rdbms/demo/cdemolb2.c <ORACLE_HOME>/rdbms/demo/cdemolbs.c
    These examples are in c, but can be used in c++
    http://otn.oracle.com/doc/server.815/a67846/app_exam.htm#430289

  • I belong to a graphic site dreamies.de and my images are disappearing from there since I right clicked on what I thought was set as desktop background. There wa

    I belong to a graphic site dreamies.de and my images are disappearing from there since I right clicked on what I thought was set as desktop background. There was another entry under it that said block images from dreamies.de. That is the one that I clicked on by accident and no one knows how to reverse it. Does anyone here know how to reverse it? I was using firefox 3.6 beta 3 when this happened. I am now on firefox 12.
    I already tried right-click the page, choose View Page Info, then click Permissions. The first item is the site-specific permission for images and you should be able to reset back to the default here. This did not work.
    I also tried right-click View Page Info and click Media. Click the first image on the list and observe the Block Images checkbox above the preview at the bottom. Arrow down the list until you come to a site that is blocked and unblock it. There was no unblock just a delete, so I deleted it. This did not work either.
    I know it is a firefox issue because the images are all there when I log in using Internet explorer, but on firefox there are many of my images missing.

    This is the question that I need an answer to:
    I belong to a graphic site dreamies.de and my images are disappearing from there since I right clicked on what I thought was set as desktop background. There was another entry under it that said block images from dreamies.de. That is the one that I clicked on by accident and no one knows how to reverse it. Does anyone here know how to reverse it? I was using firefox 3.6 beta 3 when this happened. I am now on firefox 12.
    I already tried right-click the page, choose View Page Info, then click Permissions. The first item is the site-specific permission for images and you should be able to reset back to the default here. This did not work.
    I also tried right-click View Page Info and click Media. Click the first image on the list and observe the Block Images checkbox above the preview at the bottom. Arrow down the list until you come to a site that is blocked and unblock it. There was no unblock just a delete, so I deleted it. This did not work either.
    I know it is a firefox issue because the images are all there when I log in using Internet explorer, but on firefox there are many of my images missing.

  • HT1848 I had my Iphone in sync with iTunes in my desktop PC. I had purchased musics from iTunes Store and musics I did transfer from original CDs (legacy ones). How can I recover my whole music assests on Iphone to my iTunes in my notebook PC ?

    I had my Iphone in sync with iTunes in my desktop PC. I had purchased musics from iTunes Store and musics I did transfer from original CDs (legacy ones). I no longer have my CDs once I did donate it to a public library. How can I recover my whole music assests on Iphone to my iTunes in my notebook PC ? At this time I only know how to transfer Apple Store purchased items.

    iTunes will only import music purchased from the iTunes store.  If you need to import music to iTunes from your phone that wasn't purchased from iTunes you will need to use 3rd party software to do so, such as Touch Copy.

  • I am looking to turn my iPad into a portable device to store and view multiple files transferred from my pc. I have tried some apps but it does not support multiple sub folder transfers.  Any suggestions please?

    I am looking to turn my iPad into a portable device to store and view multiple files transferred from my pc. I have tried some apps but it does not support multiple sub folder transfers.  Any suggestions please?

    I use GoodReader on my iPad and use the GoodReaderUSB tool. the GoodReaderUSB tool allows you to transfer entire folders into GoodReader without loosing the folder/file structure.
    Windows: http://www.goodiware.com/usb/GoodReaderUSBWin_200.zip
    Mac: http://www.goodiware.com/usb/GoodReaderUSBMac_202.zip

  • Iphone 4s is heating up and losing battery life fast from when i updated ios 7.0.2, iphone 4s is heating up and losing battery life fast from when i updated ios 7.0.2

    iphone 4s is heating up and losing battery life fast from when i updated ios 7.0.2, iphone 4s is heating up and losing battery life fast from when i updated ios 7.0.2

    Try this article >  iOS 7 Battery Life Draining Too Fast? It’s Easy to Fix

  • My iphone 4s has switched to the US app store and i have tried to switch back to the UK app store with itunes but it keeps saying i need to spend all of my store credit first is there any way around this

    my iphone 4s has switched to the US app store and i have tried to switch back to the UK app store with itunes but it keeps saying i need to spend all of my store credit first is there any way around this

    Go here:
    https://expresslane.apple.com/Issues.action
    Ask for assistance.

  • HT4847 My Ipad says that i am running out of storage but my icloud says that ive only used 1.4gb of the 5 allotted and when i go to usage manage storage all my apps are turned t the on postpition for backup. So i dont nderstand why my ipads storage is bei

    My Ipad says that i am running out of storage but my icloud says that ive only used 1.4gb of the 5 allotted and when i go to usage manage storage all my apps are turned t the on postpition for backup. So i dont nderstand why my ipads storage is being used

    iCloud doesn't give you more storage on your device, it only gives you more storage in iCloud to sync data, store your backups, etc.  If you're running out of space on your iPad you'll have to delete some data off your iPad to free it up, such as syncing some of your music or other media off your iPad. 
    You can check how much free space is available on your iPad by going to Settings>General>Usage and looking at the Available number at the top.

  • How to store and retrieve images from database...

    Hi All
    Anubody tell me plz how to store images in database using jsp.
    and how to retrieve tme.
    Plz reply...
    Anurag

    Exactly
    try the links below may be those might help u in store and retrieval any kind of file.
    http://www.mysqltalk.org/insert-blob-example-vt112861.html
    https://java.sun.com/j2se/1.5.0/docs/guide/jdbc/blob.html
    http://javaalmanac.com/egs/java.sql/GetBlob.html
    http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jdbc.doc/jdbc142.htm
    and a dearly advice friend please query google b4 you post any query out here.

  • Retrieve variable value from local Storage and display on canvas

    Hi
    I'm working on a project that has multiple html files (the projects are split into 12 so 12 different edge projects and im linking them via window.open()). I have a variable that keeps track of correct answers stored in LocalStorage html object. I have managed to get the localStorage variable to increment up by one each time the object is correct however my last step is to get the variable and them display the result on the canvas. I have tried
    var outPut localStorage.getItem(' ') method to retrieve the variable then used the set and get method to display the result however it doesn't work. Im not sure if I need a for loop to go though the localStorage and get the elements
    Code:
    // insert code to be run when the composition is fully loaded here
    yepnope({nope:['jquery-ui-1.10.0.custom.min.js','jquery.ui.touch-punch.min.js'],complete: init}); // load the jquery files
    sym.setVariable("myScore", 0);
    var c = localStorage["myCount"] || 0; //loading from localStorage
    function init(){
    sym.getSymbol("barLimit").$('scrubber').draggable({start: function(e){
    },drag: function(e,ui){ // start: ...  // Find original position of dragged image
    var leftLimitScrubber  = sym.getSymbol('barLimit').$('scrubber').position().left; // position of the scrubber
    var rightLimitScrubber  = sym.getSymbol('barLimit').$('leftLimit').position().left;
    var LimitTwoLeft  = sym.getSymbol('barLimit').$('rightLimit').position().left;
    if(leftLimitScrubber == rightLimitScrubber){
      sym.getSymbol('correctBar1').play('in'); //
      sym.getSymbol('nextButton').play('in');
      sym.getSymbol('incorrectBar1').play('out'); //
      sym.getSymbol('thumbsDown1').play('out'); //
      sym.getSymbol('thumbsUp1').play('in'); //
      sym.getSymbol('congrats').play('in'); //
    localStorage["myCount"] = parseInt(c)+1; //Converting string to number, and then saving it
    console.log("numberOfCorrectAnswers", localStorage["myCount"]);
    var finalScore = sym.getVariable("myScore");
    finalScore = c;
    sym.setVariable("myScore", finalScore);
    sym.$("Score").html(finalScore);
    } else if(leftLimitScrubber == LimitTwoLeft){
    sym.getSymbol('incorrectBar1').play('in');
    sym.getSymbol('correctBar1').play('out');
    sym.getSymbol('thumbsUp1').play('out');
    sym.getSymbol('thumbsDown1').play('in');
    axis: "x",
    containment: "parent"
           //for (var i = 0; i < localStorage.length; i++){ // iterate throught the local storage
             //var getItem = localStorage.getItem(localStorage.key(i));
              //if(getItem == 'numberOfCorrectAnswers' ){
    The above is the code for the 12th project in  this projects it needs to display the variable inside the object localStorage and display on the canvas.
    Any help will mean a lot. Thank You in advance
    P.S edge animate has a lot of bugs hard to code in

    what you need to do is to create a text box and set a default value of zero. Once that is don't you need a code on the stage which grabs the value form the localStorage object. I used the .text() jquery method to display the value on the canvas. So the zero will be replaced with whatever the value of the localStorage is.
    You also need a if statement to check if the localStorage is undefined, if its not then grab the value and display on the canvas.
    e.g
    var number = localStorage['finalValue']; // for the sake of completeness I had to put this line of code
    if( number ! = undefined){ // if not undefined so the object exits then ...
         sym.$(' (text identifier) '). text(number); // note text identifier is the name of the text box you create in edge
    } // Done

Maybe you are looking for

  • Upload Task List Operation long Text using SAVE_TEXT-Urgent

    Hi , I am trying to create Task List Operation Long text using the function module .. SAVE_TEXT .I am passing the following keys Text Name       300ATEST057 0000000900000009 Language        EN Text ID            PLPO Long Text Text Object     ROUTING

  • Insert taking place more than once

    Hi, I have a jsp page where the user does some selection in the drop down lists. Here I want to insert userName, date into Oracle table.I am able to do that. But the problem is it is inserting twice as the page refreshes when the user does some selec

  • Apple TV won't stay on file sharing, can anyone explain how to keep it connected ??

    Having problems keeping Applet TV connected for file sharing, Will disconnect in the middle of watching a movie. Can anyone help and tell me how to keep the two devises communicating??

  • Waiting all threads in a fixed thread pool

    Hello, may I know how can I wait for all the threads in a fixed thread pool to be completed, without calling shutdownNow? Executor pool = Executors.newFixedThreadPool(nThreads); for(int i = 0; i < 10000;  i++)     pool.execute(new StockHistoryRunnabl

  • CA-53 connectivity problem

    Every time I connect my N73 to PC trough CA-53 data cable (provided with phone) it shows that the phone is connected and after less than a second it shows that the phone is disconnected. It is like I would plug the cable in and out 4 times per second