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

Windows: Ti.Media.saveToPhotoGallery does not accept a blob

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 7.0.0, Release 6.2.0
    • Fix Version/s: Release 7.0.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Ti SDK: 6.1.2.GA, 6.2.0.v20170912203804, 7.0.0.v20170906135653

      Description

      Description

      Calling Ti.Media.saveToPhotoGallery with a blob crashes an application, when running normally the app crashes with no error. Running in debug from VS shows that the error is occurring here as media is empty

      var win = Ti.UI.createWindow();
       
      var view = Ti.UI.createView({
          backgroundColor: 'red',
          width: 400,
          height: 400,
          borderRadius: 200
      });
       
       
      win.add(view);
      win.open();
       
      view.toImage(function(image) {
          console.log('image done');
          console.log(image.length)
          Ti.Media.saveToPhotoGallery(image, {
              success: function(e) {
                  console.log('success');
              },
              error: function(e) {
                  console.log(' error');
              }
          });
      });
      

      Steps to reproduce
      1. Add to an existing app.js and build for Windows
      Actual

      App crashes

      Expected

      App shouldn't crash, red circle should be written to gallery

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Kota Iguchi
              Tester:
              Josh Longton
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code