UIImageview + afnetworking downloads images and caches the images.
But in certain cases the server images are = 15mb. So i need to compress them based on the some factor and make it to 1mb and then require to cache them.
SDWebImageCache on the other hand make you to define your own cache and store them
Is there any build in mechanism for downloading,editing and then later saving into the cache?
[SDWebImageDownloader.sharedDownloader downloadImageWithURL:imageURL
options:0
progress:^(NSInteger receivedSize, NSInteger expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished)
{
if (image && finished)
{
// do something with image
}
}];
then use [[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey]
Is there any other alternative to doing something like this?