Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1790] iPhone OS4: image from openPhotoGallery cannot be added to an imageView

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:10.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsgallery, imageview, ios, photo
ReporterShiki
AssigneeReggie Seagraves
Created2011-04-15T03:02:29.000+0000
Updated2011-04-17T01:57:10.000+0000

Description

This works:

Ti.Media.openPhotoGallery({
  allowEditing: true,
  mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
  success: function(e) {
    if (e.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
      var imageView = Ti.UI.createImageView({image: e.media});
      Ti.UI.currentWindow.add(imageView);
    }
});

But if set allowEditing to false, I get this error:

[ERROR] invalid image type. expected either TiBlob or TiFile, was: TiBlob in -[TiUIImageView setImage_:] (TiUIImageView.m:618)

Comments

  1. Stephen Tramer 2011-04-15

    Tested 1.6.0GM. Test in bugtests.

JSON Source