Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9906] iOS: rotating an image with 2DMatrix or 3DMatrix causes jaggy edges

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-09T15:49:19.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-14 API, Release 3.0.0
ComponentsiOS
Labelsapi, module_animation, qe-testadded
ReporterDavide Cassenti
AssigneeVishal Duggal
Created2012-07-09T07:49:32.000+0000
Updated2013-08-27T10:47:15.000+0000

Description

Problem description

When an image is rotated using the 2D or 3D Matrix transformation, its edges gets jaggy (very low quality).

Steps to reproduce

1. Create an app with the following code (just set the 'url' var) and run it:
var win = Ti.UI.createWindow({
	backgroundColor: '#333',
	navBarHidden: true
});

var url = IMAGE_URL_HERE;

var image = Ti.UI.createImageView({
	height: 400,
	preventDefaultImage: true,
	top: 0,
	url: url,
	width: 400
});
							
var a = Titanium.UI.createAnimation();
a.transform = Ti.UI.create2DMatrix().rotate(10);

image.animate(a);

win.add(image);
win.open();

Comments

  1. Vishal Duggal 2012-07-09

    Can be done by setting UIViewEdgeAntialiasing property to true in the info.plist
  2. Vishal Duggal 2012-07-09

    Add the following to the tiapp.xml UIViewEdgeAntialiasing This will work for SDK 2.1.0 and above. For older SDK's you'll have to modify the info.plist generated and add the UIViewEdgeAntialiasing key yourself. Please note that this is not recommended and there will be a performance hit on the app Reference: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
  3. Olga Romero 2012-08-14

    Verified fix with: Titanium Studio, build: 2.1.1.201207271312 Titanium SDK: 2.2.0.v20120813184911 Devices: iPhone 4s 5.0.1 iPad1 5.1.1 Simulator 5.1

JSON Source