ios9, ALAsset.thumbnail.size is {75,75}?

2.3k Views Asked by At

In iOS 9, I selected a photo from an album. After obtaining the ALAsset, I called the "thumbnail" to get a thumbnail and display it but photos are blurred.

In iOS 8, ALAsset.thumbnail size are 150 * 150, but in iOS 9 its 75 * 75

This is my code:

self.image = [UIImage imageWithCGImage:self.asset.thumbnail];
//self.image.size is 75*75     in ios9
//self.image.size is 150*150     in ios8

How can I solve this problem?

If I use:

[self.asset defaultRepresentation] fullScreenImage]

Then I get poor efficiency.

2

There are 2 best solutions below

0
Ty Lertwichaiworawit On BEST ANSWER

I also had this problem and solved it by using asset.aspectRatioThumbnail

    UIImageView *imageView;
    [imageView setImage:[UIImage imageWithCGImage:[asset aspectRatioThumbnail]]];
    [imageView setContentMode:UIViewContentModeScaleAspectFill];
0
yezi On

I meet this problem. ALAsset available in iOS 4.0 and later deprecated in iOS 9.0. You can use PHAsset instead in iOS9.