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

Android: bitmap size exceeds 32bits when imageView.toImage()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Invalid
    • Affects Version/s: Release 4.1.1
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Titanium SDK 3.4.1.GA/3.5.0.GA/3.5.1.GA, Android 4.4.2(Genymotion)

      Description

      This code causes an exception: "bitmap size exceeds 32bits"

      app.js

      var win = Ti.UI.createWindow();
      var savedFile = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, "myimage.png");
      var image = Ti.UI.createImageView({image: "KS_nav_ui.png");          
              function saveImage(e) {            
                  image.removeEventListener('load', saveImage);
                  savedFile.write(Ti.UI.createImageView({
                      image : image.image,
                      width : 'auto',
                      height : 'auto'
                  }).toImage());
              }
              image.addEventListener('load', saveImage);    
      win.add(image);
      win.open();
      

      This exception observed in Android 4.4.2.
      But Android 4.2.2 runs without exception.
      It disappears for 4.4.2 by replace toImage to toBlob.

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              falko Andrey Tkachenko
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code