image large loading in pieces

Hello

I'm new on the development of blackberry applications. I'm trying to load an image to 7800 x 480 with a size of 1.1 MB (8-bit image) as a background image of a game. The background image gets shift in its position of x the game continue (a bit like something a little angry bird). What I did was to load the entire image into the application using:

image = Bitmap.getBitmapResource(filename);

It loads fine with 7.0.0 and JRE os7 devices / Simulator, however I had an output of memory exception with JRE 6.0.0 and os6 devices.

Any suggestion?  Is it possible to load it in chunks so that it loads a different image section as the 'bird' moves on the x-axis? If so, how can I connect 2 pieces together so that the background image would ' move/transfer' gentle?

Thank you very much for the help.

The approach of loading the image into parts (tiles) is the right approach for this.  You will then need to "tile" from the screen.  It is a simple matter to determine which of your tiles is exposed (based on an x / coordinate) and then paint.  I suspect that you do this in paintBackground using drawBitmap - you will see that it has different settings that determine which parts of the screen will be updated by what parts of your Bitmap image.

I recommend that you load all the tiles at once, but try to preload the tiles you are likely to need in the near future.  Loading an image takes a long time and that you have discovered, a lot of space, so I think this optimization so that you load a bit as needed, but make sure that your paintBackgrounds will not wait for the tile to load is a good idea.

Tags: BlackBerry Developers

Similar Questions

  • Image large loading and mince VERY

    I can't find a good solution to this problem. It's rare cases that it should be done.

    I have a jpeg 21000 x 1100.

    Let's say it's a real movie.  I need to scroll/pan/through this jpeg.

    I tried a lot of things to cut out the image via actionscript but came out empty-handed.

    I need to load all jpeg (not in sections) and the slice of it upward through as3 in say 2000 x 1100 px sections.

    I know that there is a restriction on the size of the bitmap, but I needed a clean work around so I can use the 2 sections of the entire bitmap at a time.

    Once a section is scrolled to the wire, it would disappear, and another will be added.

    Anyone?

    Well, the restriction is a restriction so there is no way you can have a bitmat that big. What I don't understand not is, why is it so important to load as a whole and then slice it, if you could just cut it upward before it has been loaded.

    Is - this bitmap external or included in the SWF?

    (A) if it is external, and you are convinced that you need a physical file on the server, I think that it y graph libraries (php,...) who can rip your bitmap image and serve to Flash as an essential.

    (B) if it is internal, you can slice it in photoshop and import the essential.

    I see really no point forcing flash to do something clearly, he can't do it, can't see any advantage of it.

  • Speed up the image / page load

    I did a remake of the site for my business.  I'm an amateur web person - not my part-time work full-time here.  My boss wanted a lot of images.  -Now that we have them, he said that the page takes too long to load.  For directions on how to get the images / page load faster?  The model I according to the site has a front loader of ajax, but apparently not actually preload all images.  The galleries still take some time to load when you see them.  The site is up to http://www.morgansmithllc.com.  Any suggestions on how to accelerate things that a fan of DW user can implement?  Thank you!

    It's one of the downfalls of a unique layout. In this type of layout, everything must be loaded because everything exists on the same page.

    So, I tried running your page through some analyzers and found there are a few very large files that are used.  The backgrounds are enormous and could probably be more compressed.  Right now, your first 6 images are 10 MB of 20 + MB size of the page which is too much.  Also, I see a lot of Parallax javascript drag.  Just because a Web site is a single page does not mean that it must be a site of parallax.  In fact, for this type of site, I would recommend removing the Parallax because there is no need for this.

    If you simplify the site in this way, which should help a good deal with loading and scrolling speed.

  • any images not loaded for some websites - Firefox for Mac

    On the BBC, New York Times, sites Web/House of Guardian images pages load as usual (and ads are blocked). On the sites of CNN and the Washington Post, no images not loading either.

    This is true both in Firefox 3.627 (extensions 1Pasword AdLock more, Download Helper, installed on my Mac G4 running OSX 10.5.8) and in Firefox 10.0.2 (AdLock Adlock more popup Addon, color, Firefox Extension systems sheep management) on a MacBook Pro running OS x 10.6.8.

    I also Adlock in Safari on both computers, but it does not block the normal images of these same web pages, only ads.

    I'm new to Firefox and may have messed up some preference settings. I looked at them and nothing obvious comes out. Does anyone have an idea of what can be the problem?

    Thank you

    Mr

    G4 MDD Dual 1.25 GHz/2 GB RAM
    OSX 10.5.8
    MacBook Pro 13 "2.53 GHz/8 GB RAM
    OS x 10.6.8

    Do not load images or animations

    Thanks again

  • How to convert an image large parts of images? means split a jpg to several sub vivid image. (this sub image can partner in this big picture)

    Hi friends...

    How to convert an image large parts of images? means split a jpg to several sub vivid image. (this subimages can partner in this great image) any help

    In the example, I created both images and them added together, and the reverse can be done in the same way.

  • Impossible to scan an image larger and small photo on 6510 all-in-one

    Cannot parse an image larger and small photo on HP 6510. Product #CQ761A, model # B211a.

    Using Windows 7 64 bit PC. Resulting photo in my pictures is a small photo of bitty. Tried to 600 dpi and 1200 dpi also. Get always small scanned image. Any suggestions?

    Bought a memory card that works with my printer.

    Am ready to copy & paste as you suggested, but couldn't find any icon on my PC that will give me a place where I can get there.

    How can I find that?

  • 9000F Mark II - cannot select "activate the image large scans.

    When I go to scangear, advanced mode, preferences, scan and try to choose "activate the image large scans ' I can't, because it is grayed out.  What Miss me?

    Hello.

    This should be enabled from the utility of scanning IJ.  Please, perform the following steps:

    1. open the utility of scanning IJ.

    2. click on settings.

    3 click ' Scangear tab on the left.

    4. check the box to activate large analyses.

    Once done, click OK.

    It has not responded to your question or problem? Find more help contact us.

  • The project will be completed once all images finishes loading

    I'm unable to close or to share a project created in Adobe Comp CC on my iPad Pro.

    When I try to close the project I get an alert indicating that "the project close once all images finishes loading."

    I left for more than 10 minutes and nothing has changed. I tried to delete every image and he still has the same message.

    Any suggestions?

    Hi André,.

    I know that you posted Saturday; still having problems?

    When adding an asset she draws CC (depending on the file size and network speed) there may be a delay. Click the button close three times should cancel the current download (so you can start over), but sometimes, the application can get hung in this State.

    Have you tried force - leaving the app (double - press the home button, a list off apps; pass to the app and the blow up on this subject), restart your device, then relaunch the app?

    Let me know what happens.

    Sue.

  • There's hidden composition images pre-loaded widget?

    I create a page of catalogue of art with several widgets of composition in the composition widgets.  Each will have one or more image files.  I am concerned about the speed of page loading. Are 'hidden', invisible images all pre-registered or are they load as target and made visible?

    Thank you

    Learning that I will...

    Big question.

    All the content of a page is loaded to the loading of the page. The only exception is the images in a slideshow widget. For a slide show widget, only visible images are loaded when loading the page. The other images are loaded in the background once the page is finished loading.

    You will be probably more pleased with the performance of the use of separate pages for the subcategories rather than put everything in the widgets of Composition nested on a single page.

  • in other words if I click on an image file loads in cs4 instead of cs6

    in other words if I click on an image file loads in cs4 instead of cs6

    Hi johnjonesjack,

    Could you please let me know where you are trying to open the file, comes from a desktop or any other location on the computer.

    Or you try to open the file of the bridge?

    Computer on which you are working on, it's MAC or Windows?

    Kind regards

    Tanuj

  • Preview an image before loading it using the FileReference class in flex 3

    Preview an image before loading it using the FileReference class in flex 3?

    Hello

    The following code uses the filereference class to load the local images, it feeds each image into an arraycollection of bytearray collection. Its a filereference differenct aspects to load and display images.

    http://gumbo.flashhub.NET/pagedrop/ source included

    David.

  • Images from loading in layers?

    On a single layer, I have a movieclip holding of the thumbnails and on another layer below this layer, I have a component of loading that are loaded in the images. When the images are loaded, they are loading on the top of the thumbnail movieclip. Why is this and is at - it a way to solve this problem?

    Thank you!

    Dan

    How do you load the custom component Loader really make a difference in the stack of the display list.

    If the Loader component is placed on a layer under the thumbnails, and then at some point you must call: addChild ([loaderInstanceName]) - which then it will bring up in the stack.  If the charger is in the IDE, so there is no reason to call addChild and you should remove it to solve the problem.

  • check if the image is loaded before going to the next loop

    is this a 'valid' method to check if the current image is loaded before going to the next loop/image?

    var mcPics = _root.createEmptyMovieClip ('mcPics', _root.getNextHighestDepth ());
    mcPics._x = Stage.width + 1;
    for (var i = 0; i < pic_arr.length; i ++)
    {
    ["mc" + i] mcPics = mcPics.createEmptyMovieClip ("mc" + i, mcPics.getNextHighestDepth ());
    loadMovie (dir + pic_arr [i], mcPics ['mc' + i]);

    While (mcPics ['mc' + i] ._width) continue;
    }

    to do this, you can't even load them in order.  You can just count how many have successfully loaded:

    var mcPics = _root.createEmptyMovieClip('mcPics', _root.getNextHighestDepth());
    mcPics._x = Stage.width+1;
    var mcl:MovieClipLoader = new MovieClipLoader();
    var mclLO:Object = new Object();
    mclLO.onLoadInit = function(target){
         loadNum++;
         if(loadNum==pic_arr.length){
              //start your animation
         }
    }
    mcl.addListener(mclLO);
    var loadNum:Number = 0;
    for (var i = 0; i		   
  • Images not load - but work in preview mode

    HI -.

    I was wondering if someone can help me.  I'm kind new to Dreamweaver and I can't seem to figure this on my own.

    I use Dreamweaver 8.  I developed a web page based on a template in which, everything works perfectly in the "Preview" on all browsers.  But when I downloaded the files on my remote to the accommodation, the base model not load images (found in the 'images' folder) on the page. The pictures I added to the template myself, found in the 'images' folder ($ 200,000 in... and the photo down) load.  If some of the images in the images folder load some aren't.

    I checked the folder of Images at the remote site, and they all seem to be there.  I also checked for broken links, and I do not receive all (I don't know if it will help w / lack of images or not, but I will try everything I can think of).  I also checked to see if there is a CSS stylesheet and it was not provided with the template (there are some CSS info in the code on the html page).  Image sizes are all pretty small.  Can someone help me with this?

    You can view a page at: http://www.200kin5months.com/squeeze-video.html

    Thanks in advance to anyone who might be able to help!

    Stacey

    PS - I've attached a screenshot of preview of Dreamweaver to show what it is supposed to look like.

    Your Web server runs on an operating system that is case-sensitive. You seem to have downloaded a pictures folder, but not a folder of images.

    You do not have a file here:

    images / squeeze - video_425x344_r9_c6.jpg

    But you don't have a file here:

    Images / squeeze - video_425x344_r9_c6.jpg

    So you'll need either change all your image / links to point to the Images /, or download another folder called images.

    Or, if you want to use a single folder, and if your local file system is not case sensitive, you might be able to do in the DW file panel. Here is a method that you use all have them in a folder called images.

    1. SAVE YOUR FILES IN SITE
    2. Rename some Images of Foo (allow DW update links)
    3. Images and rename Foo (allow DW update links)
    4. Download the images and all the files that have changed the DW
    5. Delete the folder of Images online

    HTH

    --
    Mark A. Boyd
    Keep-on-Learnine :-)

  • viewing deferred image or loading?

    This has probably been answered somewhere, but my search terms are not finding it, I have not only a lot of problems. I don't know yet that my logical technical description.

    I think that this only happened since a recent firefox update last week. I wouldn't swear on my life that this is so.

    Images on some pages (blog pages have intruded themselves most on my notice, possibly because I read blogs differently from other content, or because they're especially large image heavy) are either loaded or displayed only when I scroll to them.  Two undesirable results: one, there's distracting motion on the screen, and jumping of the displayed text, which also means that when I scroll, the page often leaps to a different place from that I thought I'd scrolled to; two, if I happen to click on a link as the page jumps, I can end up clicking on something else entirely.
    

    For the most part, however, the Visual thrill as image in the place where I just scrolled loads/poster that makes me want to push my eyeballs on.

    Help would be very appreciated.

    Sorry for the delay, I hope that you still have eyeballs.

    Firefox on 13 "smooth scrolling" which doesn't always work well on all pages and could be responsible for the jitter. You can try turning it off here (about halfway):

    Orange Firefox button or classic menu Tools > Options > advanced > general

    With respect to deferred loading, there are websites that are coded to avoid loading images or other external content until you scroll down to the bottom. You may be able to "force" with the help of an add-on or script loading. (For example, this topic came up on the userscripts.org website, where people post scripts for use with the addition of Greasemonkey: full page loads without scrolling?)

Maybe you are looking for

  • Is there a way to prevent resizing of the video chat?

    When do a video chat with one person, said the person to see my fine video stream, which is 16:9. See display full, and all the text on both sides of the screen. Problem is when some other join in the video chat, Skype is resized or cultures my flow

  • HP Jet 7 - updating the BIOS HP

    I have a few problems on my tablet. Windows does not load, he wants to update the BIOS, he wrote new BIOS image each time, but after writing and check the new BIOS image, he is himself reboot and do the same thing, windows does not load and I can't d

  • WildTangent games Console problem

    That's how my problem started.  My (the current version) Wildtangent game console has been blocked to finalize the install on one of the games.  For this reason I could not install any other game console.  I could play games installed, but nothing el

  • I have a 64 bit system, that it would install it after that I have download the free trial 60 days but would not go

    i tired to download the student 60-day trial it downloaded but would not let me install it told me that this need in a 64-bit system. I have a 64 bit system, that he was also told to remove my old stuff I had and I did, but it would not download it.

  • Printer won't recognize no internet - router.

    I suddenly lost my HP 6600 connection and router Linksys... States problem MAC address filtering can be enabled - it's an HP printer... and it is not enabled on the router, I checked - just NO connection