{ "id": "64056", "key": "TIMOB-3424", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-28T23:59:40.000+0000", "created": "2011-04-15T03:45:01.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_label", "qe-closed-3.2.2", "qe-testadded", "supportTeam" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-13T10:24:36.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5. Problem\r\nError message shows in Ti Console when using a backgroundImage\r\non a label. \r\nh5. Error Message:\r\n \r\n{code}<Error>: CGContextConcatCTM: invalid context 0x0\r\n<Error>: CGContextSetInterpolationQuality: invalid context 0x0\r\n<Error>: CGContextDrawImage: invalid context 0x0\r\n<Error>: CGBitmapContextCreateImage: invalid context 0x0{code}\r\n \r\nh5. Test Code \r\n \r\n{code}\r\nvar window = Titanium.UI.createWindow({ \r\n title:'LabelImageTest',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar label = Titanium.UI.createLabel({\r\n backgroundImage: 'default_app_logo.png',\r\n text: 'This is a label with a backgroundImage'\r\n});\r\nwindow.add(label);\r\nwindow.open();\r\n{code}\r\n \r\nh5. Ticket Reference \r\n \r\n http://developer.appcelerator.com/helpdesk/view/76638 ", "attachment": [], "flagged": false, "summary": "iOS: Label with backgroundImage Error", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "132664", "author": { "name": "gerry3", "key": "gerry3", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I fixed it by commenting out the code that wasn't doing anything anyway:\n\n -(void)setBackgroundImage_:(id)url\n {\n if (url != nil) {\n // !!!: this doesn't work because self.frame.size isn't set\n // UIImage* bgImage = [UIImageResize resizedImage:self.frame.size \n // interpolationQuality:kCGInterpolationDefault\n // image:[self loadImage:url]\n // hires:NO];\n\n // Resizing doesn't preserve stretchability. Should we maybe fix this?\n UIImage* bgImage = [self loadImage:url];\n if (backgroundView == nil) {\n backgroundView = [[UIImageView alloc] initWithImage:bgImage];\n backgroundView.userInteractionEnabled = NO;\n [self insertSubview:backgroundView atIndex:0];\n repad = YES;\n [self padLabel];\n }\n else {\n backgroundView.image = bgImage;\n [backgroundView setNeedsDisplay];\n\n repad = YES;\n [self padLabel];\n }\n }\n else {\n if (backgroundView) {\n [backgroundView removeFromSuperview];\n RELEASE_TO_NIL(backgroundView);\n }\n }\n\n self.backgroundImage = url;\n }", "updateAuthor": { "name": "gerry3", "key": "gerry3", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-22T14:47:12.000+0000", "updated": "2011-04-22T14:47:12.000+0000" }, { "id": "162026", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-593963", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-05T11:26:15.000+0000", "updated": "2011-08-05T11:26:15.000+0000" }, { "id": "164119", "author": { "name": "roel_kramer", "key": "roel_kramer", "displayName": "Roel kramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Got this problem as well! Will find another workaround.", "updateAuthor": { "name": "roel_kramer", "key": "roel_kramer", "displayName": "Roel kramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T01:32:52.000+0000", "updated": "2011-08-26T01:32:52.000+0000" }, { "id": "195033", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Tested with 2.0.1GA2 on a HTC Sensation 4G, unable to reproduce this issue. Ticket closed.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-16T11:50:41.000+0000", "updated": "2012-05-16T11:50:41.000+0000" }, { "id": "195130", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue was filed for iOS platform so it needs to be verified against the same platform.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-16T19:55:09.000+0000", "updated": "2012-05-16T19:55:09.000+0000" }, { "id": "290125", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving this since we can't reproduce it with 3.2GA", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-28T23:59:40.000+0000", "updated": "2014-01-28T23:59:40.000+0000" }, { "id": "296283", "author": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified as fixed using below environment so closing the issue:\r\n\r\nEnvironment:\r\nAppc Studio: 3.2.2.201402280732\r\nSdk: 3.2.2.v20140221161255\r\nacs: 1.0.14\r\nnpm: 1.3.2\r\nalloy:1.3.1\r\ntitanium:3.2.1\r\ntitanium-code-processor:1.1.0\r\nXcode: 5.1-beta5\r\nOsx: Maverick(10.9.2)\r\nDevice: iPhone 5S (iOS 7.1)\r\n", "updateAuthor": { "name": "nmittal", "key": "nmittal", "displayName": "Neha Mittal", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-03-10T10:04:53.000+0000", "updated": "2014-03-10T10:04:53.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }