Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1265] imageView.toBlob() returns null

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:41.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsblob, imageview, ios
ReporterDavid R.
AssigneeReggie Seagraves
Created2011-04-15T02:48:05.000+0000
Updated2011-04-17T01:55:41.000+0000

Description

Titanium Mobile SDK 1.3.2, the ImageView.toBlob() function returns null (was working in 1.3.0).

        var imageView = Ti.UI.createImageView({
            width: 'auto',
            height: 'auto'
        });
        imageView.addEventListener('load', function()
            {
                var blob = imageView.toBlob();
                //  ^^^^ is null
            });
        imageView.image = pUrl;

Comments

  1. David R. 2011-04-15

    The problem is in 1.3.3 too

  2. David R. 2011-04-15

    If I use the (deprecated) url property instead of the image property it works. I believe the problem is here at ln 85 of TiUIImageViewProxy.m ( http://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIImageViewProxy.m)"> http://github.com/appcelerator/titanium_mobile/blob/master/iphone/C...:

       
       83 -(id)toBlob:(id)args
       84 {
       85  id url = [self valueForKey:@"url"];
       86  if (url!=nil)
       87  {
       
  3. Stephen Tramer 2011-04-15

    Tested 1.6.0RC1 in KS (Base UI->Views->Image Views->Image Blob).

  4. Stephen Tramer 2011-04-15

    Incorrect test; tested independently of that (the KS test tests setting the image FROM a blob, not translating TO a blob - it's slightly misnamed).

JSON Source