pinterest / PINRemoteImage

A thread safe, performant, feature rich image fetcher
Apache License 2.0
4.01k stars 511 forks source link

Can not see any blur effect on UIImageView #138

Closed chika-kasymov closed 8 years ago

chika-kasymov commented 8 years ago

Hello!

When I run PINRemoteImage example app, I can not see blur effect on UIImageView which is located in Progressive tab. In the beginning there is no image, and after some time UIImageView updates only once with full image.

Maybe I need add additional configuration? I run Xcode 7.2.1, and didn't change any code in example project.

Thanks for any help!

garrettmoon commented 8 years ago

@chika-kasymov blurred progressive images only show up if the image takes a while to download. You can simulate that by using the network link conditioner (http://nshipster.com/network-link-conditioner/). There's a version of the network link conditioner on iOS and on OS X which works for the simulator. Hope this helps!

garrettmoon commented 8 years ago

@chika-kasymov turns out there's a bug in the example project too! Please add

[[PINRemoteImageManager sharedImageManager] setProgressiveRendersMaxProgressiveRenderSize:CGSizeMake(2048, 2048) completion:nil];

To PINAppDelegate.m in application:didFinishLaunchingWithOptions: to fix (I'll also be fixing the library).

chika-kasymov commented 8 years ago

Thanks! Adding setProgressiveRendersMaxProgressiveRenderSize:completion: to AppDelegate helped.

chika-kasymov commented 8 years ago

Is waiting image up to 20-30 seconds without blur normal? I replaced URL from example project to http://entropymag.org/wp-content/uploads/2014/10/outer-space-wallpaper-pictures.jpg, but blur not applied.

garrettmoon commented 8 years ago

@chika-kasymov the image in the example is very large and we don't render a blurred progressive until there is at least one complete scan downloaded.

The image you provided is not a progressive jpeg. You can check if a jpeg is progressive on this site: http://techslides.com/demos/progressive-test.html

The blurring only works for jpegs that are progressively encoded.

chika-kasymov commented 8 years ago

Ok, it's my mistake. I missed that in documentation. Thanks any way!