Best way to save the images streaming from the web to device?

We have an app to browse a catalog this content of stream of a web server. There is an image for each product, some in JPG format and some in PNG format. Our server is fast and reliable, so everything worked without problems so far, but we would like to give users the ability to save data on their device, so they don't have to listen to every time. I've only worked with before SharedObjects, which are capped at 100kb and will not help in this situation.

What would be the best approach for storage of images and keeping them is crushed in the updates? Save an uncompressed Bitmap uses too much storage space. Adobe's JPEGEncoder class is completely useless because it takes 10 to 30 seconds to save an image of medium size on a typical device. Also, he does not sense of re - encode jpg files, and we must preserve transparency in png.

At the moment we are using a loader to retrieve images and using loader.content to access the image data in the code. Is it possible to save the image file in its original local format when downloaded with a charger? We would like the images stored in the application data and not available through the gallery. With regard to the registration of the data for each product (price, description, etc.), the built-in SQLite support would be enough or should we create our own files?

Thanks for the tips!

Ah, I got it. Existing files are checked as indicated cmholden. If the image is not stored locally, we use URLStream to load the image file on the web. We can then save the file directly via the ByteArray to the URLStream and then use our code existing loader to load the ByteArray even as a DisplayObject. I was worried there would be some downturn app to save the files, but the change in performance is negligible and of course once the images are saved on the device they charge a lot more quickly the next time the application is run!

Tags: Adobe AIR

Similar Questions

  • What is the best way to save the images and the docs

    I have to set a desktop application helps to include the registration of documents and images as support documents.
    What would be the best way to do it?
    Thanks for your help,
    Doug

    You can try this:

    http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e11838/sec.htm#BABCICIC

    Justin

  • What is the best way to save/download msg text from phone to computer?

    I know that I can email to my email address so I can see it on my computer, but this method does not display the text msg date time stamp. So, what is the best method, where no information is lost?

    Hello

    1. What is the brand and model of the phone?

    2. using windows mobile?

    If you use Windows mobile, then I suggest you to post your query to:

    http://answers.Microsoft.com/en-us/WinPhone

  • What is the best way to save the FMAS?

    Hi all

    I want to save my FMAS, but I know not all directory
    where I can save my FMAS or should I create new directory? Please help me out.thanks.


    Sarah

    You can configure formsweb.cfg to do this and say what is your forms_path environment variable, with it you don't have full path.

    Greeitngs.

  • best way to get the web service XML JSON etc legacy database

    We have a bunch of old scientific databases for which we would like to expose data via an XML web service.  International XML schemas have been developed in the standards for the sharing of these data we need to provide the data in.  These patterns have very different data of our legacy data structures.  We want to leave our databases within the same structures but to expose the data in them in the XML schemas.

    Building SQL indications XMLFOREST SQL etc. that returns the XML doesn't seem very practical that the structures are very different and the SQL must be very very complex and would be very tedious to make and maintain.  Is there another way to make in the database?  There are tools outside the database such as who can help in that we used in the past and could be used again - but I had much rather that on the database if possible.

    Building SQL indications XMLFOREST SQL etc. that returns the XML doesn't seem very practical that the structures are very different and the SQL must be very very complex and would be very tedious to make and maintain.

    Using SQL/XML is the most flexible way to generate XML from relational data, as you have full control over what you do.

    If the target XML structure is complex, any method will be complex to implement completely in the database anyway.

    There is no tool integrated with Oracle that would take an XML schema and make the mapping with relational data.

    What you can do is a third-party tool allows to design a XSLT stylesheet that would take care of transforming an XML format canonical (easily created from the database of a query) in the target XML instance.

    In this way the complexity lies in the style sheet, and the real transformation could be made within the database.

  • Best way to present the web form by e-mail and the Earth on a thank you page.

    Hi all

    I am a volunteer for a non-profit that has a conference, so I created a registration form I want to e-mail it to me and then the next page be a thank you page. Someone at - it a code they could "loan" me?

    Thank you!

    Dan

    Ask your host if they have a form-to-email script server you can use.

    The success.html is something create you separately and reference in the form-to-email script.

    Nancy O.

  • Best way to combine the 8-bit and 16-bit image files?

    I produce large photographic reproductions combining my own photo images modified RAW 16-bit with 8-bit stock photos and 8-bit of photoshop work. I used just reduce my photos from 16-bit to 8-bit and then change my image composite 8-bit, but I stumbled on the banding and other problems in the color gradients, I created later in my composite image.

    I want my composite image at 16 bits to get more specific and better degraded colors. What is the best way to bring the image to 8-bit files in my composition and maintain the best quality? Is it good to convert images to 8-bit to 16-bit in PS, before you import it? I've also heard bringing 8-bit images as smart objects? Thanks for any help on this.

    Even when there is no need to convert the document to the item in 16-bit mode is not.  If you need all the layers to adjust the image of the element to be light or mix better, it's better you have two choices. Do not open the file of the item in Place as a smart object layer and then open the embedded object and change the copy of your document.  Or open the target document element all the layers and then drag the document you are working on.

    The second way would produce a larger file of the document then the smart object layer way. For all layers will be 16-bit color. When the layer of integrated dynamic object is a copy of an 8-bit image file only the composite made of pixels of the object is to convert 16-bit mode.  A smart object layers pixel is like a whose pixel raster layer cannot be changed only acted on.  To change the pixels, you need to open the embedded object and modify the object.

    If you do not need the layer, you can simply drag into those that you need.  Yet once, there is no need to convert the document to the 16-bit mode, Photoshop element that will be in any copy of drag layers.

    When you use Photoshop how to think or what Photoshop just make how he could do. Shortly after, you will have a better understanding of what is happening.

  • What is the best way to save an array of objects and then load it?

    Hi, what is the best way to save and load an array of objects?

    I hade a code like that, but it does not work:

    var test = new Array();
    test.push(new Foo("a"));
    for (var i = 0; i < test.length; i++) {
        console.log(test[i]);
    }
    // save and load, then show again
    localStorage.setItem("test", test);
    var test2 = localStorage("test");
    for (var i = 0; i < test2.length; i++) {
        console.log(test2[i]);
    }
    

    the problem is, the first newspaper that get the things I want. The second time I get:

    Uncaught TypeError: Property 'localStorage' of object [object Object] is not a function
    

    The work around this problem is to stringify before saving and then analyze before loading.

    http://StackOverflow.com/a/2010948/773263

    Although I said, it is better to use IndexDB.

  • What is the best way to edit the pixels of the layer without applying the image?

    Help, please!?

    What is the best way to change the pixels on a new layer (clone, healing, patch or selection) without applying the image? When I do that, I can't change the under layer if I make a mistake.

    Does this make any sense!

    You want to use the patch tool to put the fix on its own layer? Use sample all layers in the Options bar.

  • What is the best way to resize an image, but keep the height and width of the same original size or format?

    What is the best way to resize an image, but keep the height and width of the same original size or format?

    I tried to use the function of the size of the Image, but when I changed the size of the image, the width has not changed with it.

    Thanks for the tips!

    Hi Landon.Luu,

    You want to keep the relationship between the width and height to be the same?

    Click the constraint between width and height to keep the ratio intact.

    Kind regards

    Claes

  • What is the best way to move the data from the app and Server data structures?

    Hi guys,.

    I developed my application locally with Apex 4.2 and Oracle 11 g XE on Windows 7. Not far away, it is time to move the application to a server Oracle Apex. I guess that Exim is the way to go app. But what about the APA tables and data (tables/as 'customer' and 'account' created specially for the application)? I've been using a modeling tool, so I can run a DDL script to create the database server data structures. What is the best way to move the application data on the server? Is it possible to move the structures and data in a single process?

    Thank you
    Kim

    There is probably another way to get here, but in Developer SQL, on the navigation tree, expand objects until your table, right-click, and then click EXPORT... you will see all the options. It is a tedious process and it sucks IMO, but yes, it works. This is zero especially because 1) it's a table at a time, 2) If your data model is robust and has constraints and sequences and triggers, then you will need to disable all for the insert and we hope you can re-enable constraints, etc. without hitch (good luck, unless you have only a handful of tables)

    I prefer to use the oracle EXP command-line to export an entire schema, then the server target, I use IMP to import the schema. In this way, it is almost true. This makes the dirty life if you develop multiple applications in a single schema, and I felt pain - however - it is much easier to drop the tables and other objects is to create them! (thus, even if the process of EXP/IMP moved more than you wanted to "move".. blow everything you don't want on the target after the fact...)

    You can use method datapump oracle too.

    If not, what can be done, IF you have access to both servers of your instance of SQL developer (or if you can tnsping both already from the command line, you can use SQL * MORE), is to run a script that will identify the objects of your applications apex (usually by the prefix for the names of objects, such as % EBA_PROJ_ etc.) and do all the manual work for you. I've created a script that does just that so that I can pass data from dev to prod servers on a dblink. It is difficult because of the order that must be executed to disable constraints and then turn it back on and of course, more complicated if don't always precede you ALL your "objects demand '... (tables, views, triggers, sequences, functions, procs, indexes, etc.)

  • What is the best way to place the image (with legend) in a book?

    I am preparing a model for an encyclopedia project, the encyclopedia will be in addition to 10000 pages, so what is the best way to place the images (Photos, graphic illustration,... etc) with a legend?

    The problem that when I change the text; the image does not move with it, and when I place it in the text, it is difficult to control text flow.

    Please help

    I think so, but it can be a little weird, if the position of the anchor is on the second page of a two page spread. Really, I jumped in to suggest the image and the legend of consolidation before anchoring.

  • is it possible to save an image downloaded from net?

    Hi I need to save an image downloaded from the net? How can I make it possible? is it possible to result in the RecordStore? and then use it later when we want?

    am in a difficult deadline please help me!

    Hello

    use code below...

     String Imagedirectory= System.getProperty("fileconn.dir.photos");
    
                try
                {
                    System.out.println("Imageurl="+imageurl.trim());
                    HttpConnection ImagehttpConn = (HttpConnection)Connector.open(imageurl);//,Connector.READ_WRITE, true);
                    ImagehttpConn.setRequestMethod(HttpConnection.POST);
                //  ImagehttpConn.setRequestProperty("Content-Type", "Image/jpeg");
    
                    int status= ImagehttpConn.getResponseCode();
    
                    if(status== HttpConnection.HTTP_OK)
                    {
    
                        is = ImagehttpConn.openDataInputStream();
    
                        StringBuffer Imagedata=new StringBuffer();
                         int chr;
    
                            while ((chr = is.read()) != -1)
                            {
                                Imagedata.append((char) chr);
                            }
                            System.out.println("Imagedirectory"+Imagedirectory+imagename);
                            writeFile(Imagedata.toString().getBytes(),Imagedirectory+imagename);
                        }
    
                    if(is!= null)
                    is.close();
                     if(ImagehttpConn!=null)
                         ImagehttpConn.close();     
    
                }
                catch (IOException e)
                   {
                    Dialog.alert("IOException2");
    
                } 
    
    and this for write the image //
    
    private void writeFile(byte[] data, String fileName)
          {
                FileConnection fconn = null;
                try {
                        fconn = (FileConnection) Connector.open(fileName,
                                        Connector.READ_WRITE);
                } catch (IOException e) {
                        System.out.print("Error opening file");
                }
    
                if (fconn.exists())
                        try {
                                fconn.delete();
                        } catch (IOException e) {
                                System.out.print("Error deleting file");
                        }
                try {
                        fconn.create();
                } catch (IOException e) {
                        System.out.print("Error creating file");
                }
                OutputStream out = null;
                try {
                        out = fconn.openOutputStream();
                } catch (IOException e) {
                        System.out.print("Error opening output stream");
                }
    
                try {
                        out.write(data);
                } catch (IOException e) {
                        System.out.print("Error writing to output stream");
                }
    
                try {
                        fconn.close();
                } catch (IOException e) {
                        System.out.print("Error closing file");
                }
            }
    
  • Best way to copy the ISO and Template on another VMFS volume?

    Since we are running out of disk space, we would like to change the size of a volume VMFS existing 500 GB to 400 GB.  This VMFS volume contains ISO images and virtual machine templates.

    We have already created a new 400 GB size VMFS volume and would like to know what is the best way to copy the ISO and models from the 500GB to 400GB size VMFS volume.  Can we use WinSCP or use the command line?

    Your advie is requested.

    The more simple and quick to copy ISO files store data to another, is to use Veeam FastSCP. It copies data directly from one host to another. And it's free (http://www.veeam.com/vmware-esxi-fastscp.html)

  • What is the best way to keep the high resolution when recording "for the web".

    the files that I save to the web so I can get them in jpg (or gif) are coming very pixelated.  That's when I print the image.

    What is the best way to save for the web, an image and keep the good resolution.

    using a business card template.  template Avery will allow me to attach images I want to project.  to do this...  I 'get file computer' and it deletes the image in but real little... then you are supposed to expand on your work as you want.  Well, when I enlarge this image file, it gets pixelated bad.  I think it's the way that I am saving it.  I do not adjust anything when I save.  Maybe I should.  This is where I need advice.

    That's what avery model notes on the images, I am allowed to use - when downloading the image, the maximum allowed size is 4 MB.  You can download the JPG and PNG RGB or CMYK images.  so when you recommend things, can you please take this into account

    Thanks for oyur times.

    Aida,.

    When you register with the default template using save for web, it's usually a setting very low.

    While in the registration window, you can set the size in pixels of the image you want with the quality and the resolution too.

    Refer to video tv.adobe.com save for web or Adobe Help file for detailed instructions.

    Florian

Maybe you are looking for

  • How to remove search delta?

    Please also confirm how to replace by google search

  • Cannot install Office XP Service Pack 3

    When I tri to install MS Windows XP Home Service Pack 3 it can not do...He needs the Win XP disc... and given that the computer satellite phone only comes with a restore disk(I tried to put in) what should I do? I tried to download the service pack f

  • MacBook Air cover / hinge issues

    My MacBook Air early 2015 cover/screen seems to be loose, it's because of my mossiso rubberized hard case or my mac damaged, also when I touch the black plastic that controls the screen, it seems that there is some movement. is my loose hinge / damag

  • Request failed to build on call Excel.Print report

    Software development in LV2009 that uses Report Generation Toolkit for reading/writing Excel models. Program works well in development mode. AppBuilder crashes when the *.exe build when adding NIReport.lvclassReport.vi rint Dig down, I find an arrow

  • My Sims 3 Deluxe louncher will not play

    original title: my sims deluxe louncher 3 will not play! help please My sims deluxe louncher 3 will not play the game, but is loaded down to the computer what I do