Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7681] iOS: hires property not respected for remote imageviews

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2012-10-15T17:54:14.000+0000
Affected Version/sRelease 2.0.0, Release 1.8.1, Release 1.8.2
Fix Version/sSprint 2012-04, Release 2.0.0, Release 1.8.3
ComponentsiOS
Labelsipass1, module_imageview, qe-testadded, regression, triage
ReporterFederico Casali
AssigneeIngo Muschenetz
Created2012-02-15T20:27:39.000+0000
Updated2017-03-20T22:02:24.000+0000

Description

Problem

remote imageviews with property hires set to true are displayed blurry, showing visible square pixels

Steps to reproduce


var win1 = Titanium.UI.createWindow({  
    title:'win',
    backgroundColor:'black'
});

 var image = Ti.UI.createImageView({
        "width": 45,
        "height": 45,
        "hires": true,
        "image": "http://cloud.rabble.se/images/offers/100_80_20110524154748.jpg"
    });

win1.add(image);

win1.open();

Results

Attaching 2 screenshots displaying the image with 1.8.1 and 1.8.0.1

Ticket

Customer ticket: http://support-admin.appcelerator.com/display/APP-337519

Attachments

FileDateSize
1.8.0.1.png2012-03-16T13:42:50.000+000089271
1.8.2.png2012-03-16T13:42:50.000+000082219
3.0.0_hires_not_respected.png2012-10-12T21:14:12.000+00001157078
ScreenShot-TiSDK_1801.png2012-02-15T20:27:39.000+000023746
ScreenShot-TiSDK_181.png2012-02-15T20:27:39.000+000023377

Comments

  1. Stephen Tramer 2012-02-16

    The documentation is fairly clear about what constitues an appropriate use of "hires": bq. Causes images to display at 50%, where one pixel of the graphic maps to one physical pixel on-screen. This functionality is automatically determined for local images via their filenames, and thus this property is only applicable to remote images. We need more information for this ticket: * Whether or not the image is sized for 2x and conforms to this standard
  2. Jonas Funk Johannessen 2012-02-16

    The problem is valid with 2x images, but the problem is likely the remote image cache. [Quote from Q&A:](http://developer.appcelerator.com/question/131879/sdk-181---remote-image-cache-without-retina-display) "I just noticed that the remote image cache does not show cached images with retina display. If the image is loaded the first time, everything looks good. But on second load (now from cache folder /Library/Caches) the graphic is pixelated, seems like "hires" parameter is ignored. Code works perfect with SDK <= 1.8.0.1 but fails with latest SDK 1.8.1"
  3. Stephen Tramer 2012-02-16

    Jonas - Thanks for the information. There was no change between image caching in 1.8.0.1 and 1.8.1 that would cause this behavior but it may still be introducing the problem.
  4. David Knell 2012-02-19

    I am having the exact same issue. As soon as I switched the SDK Version to 1.8.1 in tiapp.xml, all of my remote images look terrible. I switched it back to 1.8.0.1 and they look good again. I did not change the remote images or my createImageView properties - all I changed was the SDK Version. You can see a side-by-side comparison of the same image using the different SDK versions here: [http://dl.dropbox.com/u/3289523/pics/misc/imageView_hires_issue_1.8.1.jpg] I cannot release an app that has blurry images, so to me this is a critical bug. Please fix this ASAP! Dave
  5. Thomas Huelbert 2012-02-21

    Dave and Jonas - would either of you be so kind as to attach a sample script that reproduces the noted behavior? That will assist us in getting resolution as quickly as possible. Thanks much!
  6. Danny Pham 2012-02-21

    See "Steps to reproduce" above. Important: Load the app a second time so that the image is displayed from cache. Then you will notice that the image is blurry.
  7. Stephen Tramer 2012-02-22

    Regression introduced by TIMOB-7051
  8. Max Stepanov 2012-02-24

    PR https://github.com/appcelerator/titanium_mobile/pull/1492 merged into master.
  9. Danny Pham 2012-03-01

    Bug is not resolved in latest SDK 1.8.2? Do I only have to modify the 2 files as described in https://github.com/sptramer/titanium_mobile/commit/db0702eb19f0ac0777c824e12982413e43f2e1b3 to get this working? Or does the bugfix involves more files and places?
  10. Neeraj Gupta 2012-03-01

    Correct. This fix is not part of 1.8.2 release.
  11. Dustin Hyde 2012-03-16

    Adding larger, clearer screenshots comparing 1.8.0.1 (correct) and 1.8.2 (bug). Will add code when bug closed.
  12. Dustin Hyde 2012-03-16

    Closing as Fixed. SDK: 2.0.0.v20120316130302 Studio: 2.0.0.201203152033 OS: Snow Leopard Devices Tested: iPad 4.3.5, iPhone Simulator 5.0
        var win = Titanium.UI.createWindow({
            backgroundColor:'black'
        	});
        
        var imageView1 = Ti.UI.createImageView({
        	top:0,
        	left:0,
        	width: '100%',
        	height: '50%',
        	hires: true,
        	image: "http://cloud.rabble.se/images/offers/100_80_20110524154748.jpg"
        	});
        
        win.add(imageView1);
        
        var imageView2 = Ti.UI.createImageView({
        	bottom:0,
        	left:0,
        	width: '100%',
        	height: '50%',
        	hires: true,
        	image: "http://cloud.rabble.se/images/offers/100_80_20110524154748.jpg"
        	});
        
        win.add(imageView2);
        
        win.open();
        
    Note: The error image results in an extremely blurry image (fine lines are not discernable), while the correct image is only slightly blurry (fine lines are discernable).
  13. Dustin Hyde 2012-03-16

    Note: The hires property is iOS only.
  14. Dustin Hyde 2012-03-16

    Note: This test uses external server resources.
  15. Dustin Hyde 2012-04-05

    Opening to edit labels.
  16. Olga Romero 2012-10-12

    Reopened, two the same resolution images are displayed on a screen. Added a screenshot 3.0.0_hires_notrespected.png. Tested on: Titanium Studio, build: 3.0.0.201210090117 Titanium SDK, build: 3.0.0.v20121012114611 Devices: iPad3 ios 5.1.1 iPhone4 ios 5.1.1 iPhone5 ios 6.0
  17. Ingo Muschenetz 2012-10-15

    Is there a reason this didn't get the qe-ios100112 label?
  18. Vishal Duggal 2012-10-15

    Invalid test case. Ofcourse both the images have the same resolution. You have explicitly set the width and the height. The test case for respecting hires flag should have Ti.UI.SIZE width and height. When that is the case the hires image should have half the resolution of the non hires image.
  19. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source