Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-5391

Android: Image Bitmap Loaded Multiple Times in ImageView

    Details

      Description

      While evaluating bitmap allocation, we discovered that bitmaps are fetched and scaled-down twice for each ImageView, which should not be necessary. We are working to fix that in core code.

      Reproduce in 1.7.2:

      • Create a new app with this app.js:

      app.js

      Titanium.UI.setBackgroundColor('#000');
      var win = Titanium.UI.createWindow({  
          title:'Test',
          backgroundColor:'#000',
      	exitOnClose: true
      });
       
      win.add(Ti.UI.createImageView({
      	image: "KS_nav_ui.png"
      }));
       
      win.open();
      

      • Launch the app from Ti Studio to an emulator.
      • In Ti Studio, down at the console view, turn off the two "Show console when..." options.
      • Switch to the FastDev Process console.
      • When the app loads, you'll notice in the FastDev Process console that KS_nav_ui.png is fetched three times. It should only be fetched twice – once for getting bitmap size in order to calculate a sample size, and once to load the whole thing.

        Attachments

          Activity

            People

            • Assignee:
              billdawson Bill Dawson
              Reporter:
              dthorp Don Thorp
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-4571
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration