Advanced framework for loading, caching, processing, displaying and preheating images.

Related tags

Image DFImageManager
Overview

Advanced framework for loading, caching, processing, displaying and preheating images.

This framework is no longer maintained.

Programming in Swift? Check out Nuke!

Features

  • Zero config
  • Works great with both Objective-C and Swift
  • Performant, asynchronous, thread safe
Loading
Caching
Processing
  • Optional FLAnimatedImage integration
  • Optional WebP integration
  • Progressive image decoding including progressive JPEG
  • Background image decompression and scaling in a single step
  • Resize and crop loaded images to fit displayed size, add rounded corners or circle
Advanced
  • Customize different parts of the framework using dependency injection
  • Create and compose image managers into a tree of responsibility

Getting Started

  • Take a look at comprehensive demo using pod try DFImageManager command
  • Check out complete documentation and Wiki
  • Install, @import DFImageManager and enjoy!

Usage

Zero Config

[[DFImageManager imageTaskForResource:<#imageURL#> completion:^(UIImage *image, NSError *error, DFImageResponse *response, DFImageTask *task){
    // Use loaded image
}] resume];

Adding Request Options

DFMutableImageRequestOptions *options = [DFMutableImageRequestOptions new]; // builder
options.priority = DFImageRequestPriorityHigh;
options.allowsClipping = YES;

DFImageRequest *request = [DFImageRequest requestWithResource:<#imageURL#> targetSize:CGSizeMake(100, 100) contentMode:DFImageContentModeAspectFill options:options.options];

[[DFImageManager imageTaskForRequest:request completion:^(UIImage *image, NSError *error, DFImageResponse *response, DFImageTask *imageTask) {
    // Image is resized and clipped to fill 100x100px square
    if (response.isFastResponse) {
        // Image was returned synchronously from the memory cache
    }
}] resume];

Using Image Task

DFImageTask *task = [DFImageManager imageTaskForResource:<#imageURL#> completion:nil];
NSProgress *progress = task.progress;
task.priority = DFImageRequestPriorityHigh; // Change priority of executing task
[task cancel];

Using UI Components

Use methods from UIImageView category for simple cases:

UIImageView *imageView = ...;
[imageView df_setImageWithResource:<#imageURL#>];

Use DFImageView for more advanced features:

DFImageView *imageView = ...;
imageView.allowsAnimations = YES; // Animates images when the response wasn't fast enough
imageView.managesRequestPriorities = YES; // Automatically changes current request priority when image view gets added/removed from the window

[imageView prepareForReuse];
[imageView setImageWithResource:<#imageURL#>];

UICollectionView

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    UICollectionViewCell *cell = <#cell#>
    DFImageView *imageView = (id)[cell viewWithTag:15];
    if (!imageView) {
        imageView = [[DFImageView alloc] initWithFrame:cell.bounds];
        imageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
        imageView.tag = 15;
        [cell addSubview:imageView];
    }
    [imageView prepareForReuse];
    [imageView setImageWithResource:<#image_url#>];
    return cell;
}

Cancel image task as soon as the cell goes offscreen (optional):

- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
    [((DFImageView *)[cell viewWithTag:15]) prepareForReuse];
}

Preheating Images

NSArray
    *requestsForAddedItems = <#requests#>;
[DFImageManager 
   startPreheatingImagesForRequests:requestsForAddedItems];


   NSArray
   
     *requestsForRemovedItems = <#requests#>;
[DFImageManager 
    stopPreheatingImagesForRequests:requestsForRemovedItems];
   
  

Progressive Image Decoding

// Enable progressive image decoding
[DFImageManagerConfiguration setAllowsProgressiveImage:YES];

// Create image request that allows progressive image
DFMutableImageRequestOptions *options = [DFMutableImageRequestOptions new];
options.allowsProgressiveImage = YES;
DFImageRequest *request = <#request#>;

DFImageTask *task = <#task#>;
task.progressiveImageHandler = ^(UIImage *__nonnull image){
    imageView.image = image;
};
[task resume];

Customizing Image Manager

id
    fetcher = <#fetcher#>;

   id
   
     decoder = <#decoder#>;

    id
    
      processor = <#processor#>;

     id
     
       cache = <#cache#>;

DFImageManagerConfiguration *configuration = [[DFImageManagerConfiguration 
      alloc] 
      initWithFetcher:fetcher];
configuration.decoder = decoder;
configuration.processor = processor;
configuration.cache = cache;

[DFImageManager 
      setSharedManager:[[DFImageManager 
      alloc] 
      initWithConfiguration:configuration]];
     
    
   
  

Composing Image Managers

The DFCompositeImageManager constructs a tree of responsibility from image managers and dynamically dispatch requests between them. Each manager should conform to DFImageManaging protocol. The DFCompositeImageManager also conforms to DFImageManaging protocol so that individual managers and compositions can be treated uniformly.

id
    manager1 = <#manager#>

   id
   
     manager2 = <#manager#>

    id
    
      composite = [[DFCompositeImageManager 
     alloc] 
     initWithImageManagers:@[manager1, manager2]];
    
   
  

Design

Protocol Description
DFImageManaging A high-level API for loading images
DFImageFetching Performs fetching of image data (NSData)
DFImageDecoding Converts NSData to UIImage objects
DFImageProcessing Processes decoded images
DFImageCaching Stores processed images into memory cache

Installation

CocoaPods

To install DFImageManager add a dependency in your Podfile:

pod 'DFImageManager'

By default it will install these subspecs:

  • DFImageManager/Core - DFImageManager core classes
  • DFImageManager/UI - UI components

There are four more optional subspecs:

  • DFImageManager/AFNetworking - replaces networking stack with AFNetworking
  • DFImageManager/GIF - GIF support with a FLAnimatedImage dependency
  • DFImageManager/WebP - WebP support with a libwebp dependency
  • DFImageManager/PhotosKit - Photos Framework support

To install optional subspecs include them in your Podfile:

pod 'DFImageManager'
pod 'DFImageManager/AFNetworking'
pod 'DFImageManager/GIF'
pod 'DFImageManager/WebP'
pod 'DFImageManager/PhotosKit'

Carthage

DFImageManager has a limited Carthage support that doesn't feature FLAnimatedImage and AFNetworking integration. To install DFImageManager add a dependency to your Cartfile:

github "kean/DFImageManager"

Requirements

  • iOS 8.0+ / watchOS 2
  • Xcode 7.0+

Supported Image Formats

  • Image formats supported by UIImage (JPEG, PNG, BMP, and more)
  • GIF (GIF subspec)
  • WebP (WebP subspec)

Contribution

  • If you need help, use Stack Overflow. (Tag 'dfimagemanager')
  • If you found a bug, and can provide steps to reproduce it, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, branch of the develop branch and submit a pull request.

Contacts

License

DFImageManager is available under the MIT license. See the LICENSE file for more info.

Comments
  • sometimes empty image

    sometimes empty image

    hello

    i am in the process of porting to DFImageManager from SDWebImage :) - one of the main reason, the GIF support.

    right now i have a few collectionviews (inside uitabbarcontroller) each with a bunch of cells (mtl.image is DFImageView).

    doing something like

    [mtl.image prepareForReuse];
    [mtl.image setAllowsAnimations:NO];
    [mtl.image setImageWithResource:[NSURL URLWithString:obj.imageUrl]];
    

    loading the same datasource, into two tabs (collection views) - sometimes does not load images in one collectionview, and in the other it does (mainly on GIFS), i have no clue where to start debugging, any hints?

    regards helmut

    opened by hjanuschka 8
  • DFImageView and Aspect Fit

    DFImageView and Aspect Fit

    Aspect fit doesn't appear to be working properly when setting a DFImageView's image using setImageWithRequest: and the request's contentMode set to DFImageContentModeAspectFit. Mine are doing a fill instead.

    bug 
    opened by bonebox 8
  • Caching across app launches

    Caching across app launches

    I'm using a DFImageView in a UICollectionViewCell and calling the setImageWithResource: method. The caching seems to work as long as my app is open, but every time I restart the app it downloads the images again remotely. Is there some additional configuration needed to make the cache persist across app launches?

    question 
    opened by bonebox 8
  • Find Alternative For __has_include

    Find Alternative For __has_include

    While looking at using this for tvOS or other platforms (might be the same for watchOS2), __has_include does not work properly with Cocoapods. I am seeing this specifically in DFImageManager+DefaultManager:

    #if __has_include("DFImageManagerKit+PhotosKit.h")
        [managers addObject:({
            DFPhotosKitImageFetcher *fetcher = [DFPhotosKitImageFetcher new];
            [[DFImageManager alloc] initWithConfiguration:[DFImageManagerConfiguration configurationWithFetcher:fetcher processor:processor cache:cache]];
        })];
    #endif
    

    One idea could do a conditional to check if it is cocoa pods, and if it is use the defines with pod specs, and if it is not then use the __has_include.

    Reference: https://github.com/CocoaPods/CocoaPods/issues/1249

    enhancement 
    opened by bassrock 7
  • Custom keyboard extension crashes

    Custom keyboard extension crashes

    I have custom keyboard extension with collectionView of gifs from server. The problem is that when I'm scrolling - keyboard crashes if memory allocation more than 40 Mb.

    opened by andrey-lisovskiy 6
  • Doesn't support iOS 8 via Carthage?

    Doesn't support iOS 8 via Carthage?

    Hi, I've tried to implement DFImageManager in my project via Carthage, but as soon as I run on iOS 8 - I get crash with info: dyld: Symbol not found: _NSArray0 DFImageManager.framework/DFImageManager (which was built for iOS 9.0)

    I've dug a little in the project settings and found: IPHONEOS_DEPLOYMENT_TARGET = 9.0 in settings. Does that mean that you don't support iOS 8 anymore or is this just a mistake with Carthage setup?

    bug 
    opened by Quarezz 5
  • DFImageManagerImageLoader sometimes fails to cancel fetch operations

    DFImageManagerImageLoader sometimes fails to cancel fetch operations

    DFImageManagerImageLoader (private class) uses a single fetch operation for equivalent request. Executing operations are stored in a dictionary with wrapped requests as a keys. This dictionary is the only object that holds strong references to the operations.

    Operations are removed from the dictionary in two places:

    1. When image task is cancelled and there are no remaining tasks that are subscribed to the operation
    2. When operation is complete

    Operation's completion handler is called for cancelled operations. The problem arises when you start, cancel and then restart the same requests very fast. In that case there is a chance that DFImageManagerImageLoader would remove a second operation (for restarted request) when handling completion of the first operation (which was cancelled). The requests are the same, but operations are different. This would lead to the operation deallocation (actually deallocation of its wrapper) which would prevent DFImageManagerImageLoader from cancellation and reusing this operation later.

    bug 
    opened by kean 5
  • PHAsset GIF support

    PHAsset GIF support

    More of a question than a bug, but are GIFs supported for PHAssets or just remote resources loaded via url? I ended up inspecting the UTI in the info dictionary and then loading the GIF as data with the standard -[PHImageManager requestImageDataForAsset:options:resultHandler:]. Thanks and nice framework ... can't believe I hadn't seen it till now.

    feature 
    opened by chadpod 5
  • Image incomplete download

    Image incomplete download

    Firstly, thank you for this nice library.

    I have a problem with only some specifics URLs : When I have a bad network conditions, I get incomplete download, and the image is not stored in cache :

    capture d ecran 2016-01-12 a 15 18 48

    The header of the URL of the image :

    Cache-Control → private Connection → keep-alive Content-Length → 94896 Content-Type → image/jpg Date → Tue, 12 Jan 2016 14:21:14 GMT Expires → Thu, 11-Feb-2016 14:21:13 GMT Pragma → cache Server → Rocket 1.2.6 Python/2.7.3 X-Powered-By → web2py

    Example of URL : http://preprod.verybuzzy.com:8000/bitc/Webservice_Media/getUserPhoto/1/58/1

    Have you any idea what it is this bug? Thank you

    opened by HamzaGhazouani 4
  • Image decompression and scaling in a single step

    Image decompression and scaling in a single step

    Move image decompression to the processing stage which allows to decompress and scale images in a single step

    • Implement image decompression in DFImageProcessor
    • Add shouldDecompressImages property to DFImageProcessor
    enhancement 
    opened by kean 4
  • WebP format support

    WebP format support

    Hi, guys!

    I'm trying to download webp image at url @"https://www.gstatic.com/webp/gallery/2.sm.webp" simply using this method

     - (void)setImageWithResource:(nullable id)resource targetSize:(CGSize)targetSize contentMode:(DFImageContentMode)contentMode options:(nullable DFImageRequestOptions *)options;
    

    However I'm getting the error

    Error Domain=DFImageManagerErrorDomain Code=-2 "The operation couldn’t be completed. (DFImageManagerErrorDomain error -2.)"
    

    Could you help me, please?

    opened by diehardest 3
Releases(2.0.2)
  • 2.0.2(Dec 17, 2017)

    • Added ability to set the animation duration for fading in the image. Thanks to @holgersindbaek
    • Fix Xcode 9 warnings
    • Fix Xcode 9 static analyzer issues
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Jan 12, 2016)

  • 2.0.0(Dec 27, 2015)

  • 1.0.1(Nov 18, 2015)

  • 1.0.0(Sep 27, 2015)

    Overview

    DFImageManager 1.0.0 is the first major release. It makes DFImageManager more robust and future proof.

    The main difference is the absence of conditional compilation that relied on __has_include macros. Conditional compilation now only takes place when default image manager is created and doesn't rely on __has_include. In practice from the user point of view everything should work the same way it did before.

    DFImageManager is also getting deprecated in favor of Nuke.

    Changes

    Big

    • Now requires iOS 8.0+
    • Remove conditional compilation that relied on __has_include macros
    • DFImageView can no longer be used for GIF playback, use DFAnimatedImageView instead
    • Add DFCompositeImageDecoder
    • Add DFWebPImageDecoder
    • Add DFAnimatedImageView, DFAnimatedImageDecoder, DFAnimatedImageProcessor
    • Remove +[DFImageManager sharedDecoder] dependency injector, there is now a single entry point to configure image manager and that is DFImageManagerConfiguration
    • Remove -[DFURLImageFetcher initWithSession:sessionDelegate:] method and DFURLImageFetcherSessionDelegate protocol, this feature was too hardcode for basic built-in networking
    • DFImageManager/NSURLSession subspec is removed, sources made part of DFImageManager/Core subspec
    • Add limited Carthage support

    Small

    • #12 Lightweight generics thanks to @adly-holler
    • DFImageManagerConfiguration no longer forces you to initialize it with image fetcher instance
    • Add convenience class methods to DFImageManager that forward calls to sharedManager
    • -[DFImageProcessing shouldProcessImage:forRequest:partial:] method is now optional
    • [DFImageTask resume] method now returns image task
    • Fix -[NSCache df_recommendedTotalCostLimit] for watchOS
    • Remove +[DFImageManager addSharedManager:] method
    • Remove +[DFImageManager defaultManager] method
    • DFImageManager/PhotosKit subspec is now optional
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Sep 12, 2015)

    Overview

    DFImageManager 0.8.0 makes things more cohesive. Documentation, examples, demos, project structure - everything was revised and uncluttered. This release also features limited watchOS 2 support which at this point includes DFImageManager/Core and DFImageManager/NSURLSession subpecs.

    Changes

    Major

    • #28 DFImageFetching protocol now requires fetch operation to conform to simple DFImageFetchingOperation protocol
    • #15 watchOS 2 support, at this moment only DFImageManager/Core and DFImageManager/NSURLSession subpecs are available
    • DFImageManager/Extensions subspec with DFCompositeImageTask and DFProxyImageManager are no longer part of the framework. There are multiple more generic ways to implement those features.
    • Revised documentation, examples, demos, project structure

    Minor

    • #75 Provide an easier way to enable progressive image decoding
    • #73 -[DFImageManaging imageTaskForRequest:completion:] and -[DFImageManaging imageTaskForResource:completion:] methods return nonnull image task instead of nullable
    • Cleaner DFImageRequestOptions implementation
    • Remove canonical requests feature which was very application specific
    • Reduce number of DFImageRequestPriority options, DFImageRequestPriority no longer bound to NSOperationQueuePriority
    • Multiple implementation details are improved across the board
    Source code(tar.gz)
    Source code(zip)
  • 0.7.2(Sep 6, 2015)

  • 0.7.1(Sep 4, 2015)

    Overview

    DFImageManager 0.7.1 focuses on stability and performance. The main changes were made to the image processing. Images are now decompressed and scaled in a single step (x2-4 times faster depending on scale, significantly reduces memory usage) which allows DFImageManager to scale large images (~6000x4000 px) and prepare them for display with ease.

    Changes

    Major

    • #64 Image decompression and scaling are now made in a single step (x2-4 times faster depending on scale, significantly reduces memory usage)

    Minor

    • #70 Always draw decompressed images using kCGImageAlphaPremultipliedFirst and CGColorSpaceCreateDeviceRGB
    • #67 Refactor task queue in DFURLImageFetcher; Delay only execution of session tasks, not cancellation
    • #66 DFPhotosKitImageFetcher remove obsolete targetSize and contentMode checks in isRequestCacheEquivalent:toRequest method
    • #65 Remove excessive -[DFAnimatedImage initWithAnimatedGIFData:] method; make animatedImage property nonnull
    • #63 Remove unused methods from UIImage+DFImageUtilities
    • #60 Make DFImageManager/Core subspec smaller by moving non-core classes to DFImageManager/Extensions subspec.
    • Remove excessive DFImageViewDelegate
    • Remove excessive imageTargetSize, imageContentMode and imageRequestOptions properties from DFImageView
    • Remove excessive -[DFURLImageFetcherDelegate URLImageFetcher:didEncounterError:] method

    Bugfix

    • #71 BUGFIX: DFImageManagerImageLoader sometimes fails to cancel fetch operations
    • #69 BUGFIX: Fix -[DFImageManager invalidateAndCancel]
    • #68 BUGFIX: Add optional -[DFImageFetching invalidate] method that would allow DFURLImageFetcher and DFAFImageFetcher to invalidate NSURLSession and release delegate
    • #62 BUGFIX: Fix GIF cost calculation in DFImageCache
    • BUGFIX: Fix DFImageView priority management
    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Aug 23, 2015)

    Overview

    DFImageManager 0.7.0 brings progressive image decoding support, and puts everything in its right place. It adds a separate stage for image decoding (see new DFImageDecoding protocol), and narrows role of the DFImageFetching protocol which is now only responsible for fetching image data (NSData).

    Changes

    Major

    • #46 Add a separate stage for image decoding. Add multiple ways to configure and extend image decoding: add DFImageDecoding protocol, DFImageDecoder class; add decoder to DFImageManagerConfiguration; add dependency injector to set shared decoder.
    • #41 Add GIF support for PHAsset. Also includes major changes in DFImageFetching protocol, which is now only responsible for fetching image data (NSData).
    • #28 Add progressive image decoding, including progressive JPEG support.
    • Remove ALAssetsLibrary support due to the changes to the DFImageFetching protocol that now returns NSData instead of UIImage. It's easy to add you own application-specific ALAssetsLibrary support by either implementing DFImageFetching protocol and fetching NSData (and letting DFImageManager class do all the decoding, processing, caching and preheating), or by implementing DFImageManaging protocol itself.

    Minor

    • #56 Xcode 7 compatibility
    • #54 Add shouldDecompressImages property to DFImageDecoder. Default value is YES.
    • #53 Add Carthage support
    • #52 Add defaultOptions class method to DFMutableImageRequestOptions which allows user to modify request options on per-application level
    • #51 DFImageProcessor makes a decision of weather it should process GIF images, not DFImageManager
    • #50 Add removeAllCachedImages to DFImageManaging protocol; Add optional removeAllCachedImages to DFImageFetching protocol
    • #49 Add shouldProcessImage:forRequest: method to DFImageProcessing protocol that would allow DFImageManager to skip processing step entirely
    • #47 Better signature checks to identify image formats; Add WebP signature check
    • Refactor DFImageManagerImageLoader (private class that was introduced in the previous version)
    • Improve DFImageView performance (use DFImageTask directly)
    • Remove DFNetworkReachability and auto retry from DFImageView
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Aug 8, 2015)

    Overview

    DFImageManager 0.6.0 focuses on consistency and performance. It features some minor improvements in the API and some major improvements in the implementation. The main changes were made to the DFImageManager class that was made much more approachable.

    Changes

    Major

    • #38 DFImageRequest and DFImageRequestOptions are now immutable, options are created using builder
    • #37 Improve DFImageTaskCompletion completion block. Remove dictionary with DFImageInfo* keys; error (NSError *) is now a separate argument; add response (DFImageResponse) and completedTask (DFImageTask) parameters. It's now easier to discover all options.
    • #34 DFImageManager implementation is now much more approachable, and also more robust and performant (request execution management is moved from DFImageManager to a separate private class).
    • #32 DFImageTask now changes state synchronously on the callers thread (when you resume or cancel task). As a "side effect" DFImageManager invalidation is now thread safe.
    • #19 NSProgress is now used instead of blocks. Includes support for implicit progress composition, cancellation using progress objects, and more.

    Minor

    • #39 Improve DFCompositeImageManager dispatch logic for preheating requests
    • #36 Multiple preheating performance improvements. DFImageManager now automatically removes obsolete preheating tasks without even resuming them.
    • #35 UI classes now accept nullable resources and requests (more convenient)
    • #33 BUGFIX: Remove setNeedsUpdateConstrains call from DFImageView
    • #30 UIImageView df_setImage: family of methods now return DFImageTask
    • Make nullability annotations explicit; fixe nullability annotations in couple of places
    • Other minor improvements that include consistent dot-syntax usage, making some properties copying and more
    • Remove deprecated methods
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Jul 19, 2015)

    Overview

    DFImageManager 0.5.0 is a major release that brings WebP support, introduces some great new APIs, and features redesigned DFCompositeImageTask.

    Changes

    • #14 WebP support
    • #22 Rename DFImageRequestID to DFImageTask, add new public interfaces (state, request, error and more)
    • #24 DFImageManager guarantees that the error is always created when the task fails
    • #25 Add -resume method to DFImageTask, tasks should not start running automatically
    • #26 Completely redesigned DFCompositeImageTask, simple interface, fully covered by unit tests
    • #27 Add - (void)getImageTasksWithCompletion:(void (^)(NSArray *tasks, NSArray *preheatingTasks))completion; method to DFImageManaging protocol
    • Minor performance improvements
    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Jul 3, 2015)

    • #21 Add documented way to determine whether the response came from memory cache. Remove undocumented way to do that from previous versions.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Aug 9, 2015)

    Overview

    DFImageManager now works great with Swift thanks to new nullability annotations. Some internals has also changed accordingly. Make sure that the way you use DFImageManager API complies with the new requirements.

    Changes

    Major

    • #11 Add nullability annotations
    • #13 DFImageManager's memory cache fast path is now completely transparent to the client
    • #17 Add invalidateAndCancel method to DFImageManaging protocol that cancel all outstanding requests and invalidate the image manager (new requests may not be started). DFImageManager internal tasks now hold strong references to the image manager
    • DFCompositeImageManager now raises NSInvalidArgumentException when there are no registered managers that can handle the request

    Minor

    • #9 DFImageView no longer overrides contentMode set in Interface Builder
    • #18 DFImageView no longer implements DFImageViewDelegate protocol which makes this protocol available for the clients
    • DFImageContainerView is not longer part of the framework
    • Remove ALAssetsLibrary+DFImageManager category, shared assets library is now exposed by DFAssetsLibraryImageFetcher class method
    • DFAssetsLibraryImageFetchOperation is now a private class
    • DFPhotosKitImageFetchOperation is now a private class
    • DFImageManagerConfiguration fetcher property is now readwrite, not readonly (simplifies configuration)
    • Upgrade playground
    Source code(tar.gz)
    Source code(zip)
  • 0.3.2(Jun 9, 2015)

    • Fix synchronization issue in [DFImageManager startPreheatingImagesForRequests:] method
    • Fix "multiple definition types for selector warning"
    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Mar 27, 2015)

  • 0.3.0(Mar 24, 2015)

    • New, rock solid DFImageManager implementation based on finite state machines, 25% smaller. The FSM code is based on ImageManager implementation from Nuke (experimental DFImageManager analog written in Swift).
    • Add DFImageManagerErrorDomain and DFImageManagerErrorCancelled. The DFImageManager now guarantees that completion block for the request is called when the request is cancelled.
    • DFImageRequestID implements NSCopying protocol and can be used in dictionaries, sets, etc
    • DFAFURLImageFetcher now tracks progress of data tasks
    • Fix DFImageRequestOptions priority that can now be used on iOS 7 (@andrebraga)
    • Fix crash when using DFImageProcessingCornerRadiusKey (@andrebraga)
    • Fix an issue when UIImageView (DFImageManager) wasn't canceling requests.
    • Remove -cancelRequestWithID and -setPriority:forRequestWithID: methods from DFImageManagingCore protocol. There is a single way to cancel request or change its priority (using DFImageRequestID)
    • Remove -startPreheatingImageForResources:targetSize:contentMode:options: and -stopPreheatingImageForResources:targetSize:contentMode:options: methods from DFImageManaging protocol. There is now a single way to start/stop preheating using -start(stop)PreheatingImagesForRequests: methods.
    • Streamlined DFImageManaging protocol. Remove DFImageManagingCore protocol.
    • Remove allowsSynchronousMemoryCacheLookup option, this option is always on.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Mar 20, 2015)

    • Fix GIF demo
    • Fix cross-dissolve issue in DFImageContainerView
    • Improve performance
    • Remove DFProcessingImageFetcher and DFProcessingInput, rely on memory cache instead of reusing processing operations (which is much easier to implement)
    • Processing operations for preheating requests now have low priority
    • Further reduce the code base
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Mar 11, 2015)

    Overview

    This is a delightful release that brings an AFNetworking integration. Combine the power of both frameworks!

    Another great improvement is a support for CocoaPods dynamic frameworks. You can now use DFImageManager in your Swift projects.

    This version also dramatically simplifies a lot of stuff. The project structure has changed, and new subspecs have been introduced.

    AFNetworking

    This release gives you a full power of AFNetworking. All you need to do is install optional DFImageManager/AFNetworking subspec, which replaces DFImageManager networking stack with AFNetworking. The integration is dead simple, the entire subspec is just 124 lines of code. In case you don't want to use AFNetworking, the DFImageManager still provides its basic networking implementation, which is included in DFImageManager/NSURLSession subspec.

    Subspecs

    Default subspecs:

    • DFImageManager/Core - core DFImageManager classes, now just under 1600 lines of code
    • DFImageManager/UI - UI components
    • DFImageManager/NSURLSession - basic networking on top of NSURLSession
    • DFImageManager/PhotosKit - Photos Framework support
    • DFImageManager/AssetsLibrary - ALAssetsLibrary support

    Optional subspecs:

    • DFImageManager/AFNetworking - replaces networking stack with AFNetworking
    • DFImageManager/GIF - GIF support with a FLAnimatedImage dependency

    Changes

    • Add DFImageManager/AFNetworking subspec which replaces networking stack with AFNetworking when installed #5
    • Add support for CocoaPods dynamic frameworks #4
    • Move UI components to new DFImageManager/UI subspec
    • Move NSURLSession support to new DFImageManager/NSURLSession subspec
    • Move Photos Framework support to new DFImageManager/PhotosKit subspec
    • Move ALAssetLibrary support to new DFImageManager/AssetsLibrary subspec
    • DFImageManager/GIF subspec is now optional
    • +[DFImageManager setSharedManager] method is now thread safe
    • Add +[DFImageManager addSharedManager] to simplify managers composing
    • DFImageManager now holds strong references to the operations created by image fetchers
    • Remove DFURLImageRequestOptions class, use DFURLRequestCachePolicyKey instead
    • Remove DFAssetsLibraryImageRequestOptions class, use DFAssetsLibraryImageSizeKey and DFAssetsLibraryAssetVersionKey instead
    • Remove DFPhotosKitImageRequestOptions class, use DFPhotosKitVersionKey, DFPhotosKitDeliveryModeKey, DFPhotosKitResizeModeKey instead
    • Remove DFMutableImageResponse class, DFImageResponse now has a sufficient initializer and no longer need to be copied
    • Rename DFCompositeImageFetchOperation to DFImageFetchTask (emphasize that it’s not an NSOperation subclass)
    • Rename DFCompositeImageRequestContext to DFImageFetchContext
    • Remove DFImageFetchOperation, DFOperation classes
    • DFPhotosKitImageFetchOperation no longer depends on DFImageManager classes
    • Remove DFImageInfoURLResponseKey
    • Rename DFImageManagerValueTransforming to DFProxyRequestTransforming, which now has a single responsibility. The DFProxyRequestTransforming now also allows you to modify the entire request, not just a resource; Remove DFImageManagerBlockValueTransformer class
    • Make DFURLSessionOperation private
    • Improved documentation
    Source code(tar.gz)
    Source code(zip)
Owner
Alexander Grebenyuk
I write kean.blog and like porridge
Alexander Grebenyuk
A Swift/SwiftUI utility for caching and displaying images in SwiftUI Views

A Swift/SwiftUI utility for caching and displaying images asynchronously. Built with Swift 5.5 and works with async/await.

王雪铮 Xuezheng Wang 1 May 5, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients

Twitter Image Pipeline (a.k.a. TIP) Background The Twitter Image Pipeline is a streamlined framework for fetching and storing images in an application

Twitter 1.8k Dec 17, 2022
ImageView - Component for loading and displaying different images aka SVG/PNG/JPG/JPEG

ImageView Component that loads and displays images(.svg/.png/.jpg/.jpeg) form as

Sergei 1 Mar 23, 2022
Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web

Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web. It provides you a chance to use a pure-Swift way to work

Wei Wang 20.9k Dec 30, 2022
SwiftUI view that download and display image from URL and displaying Activity Indicator while loading .

ViewWithActivityIndicator ViewWithActivityIndicator is a SwiftUI view that download and display image from URL and displaying Activity Indicator while

Ali Adam 28 Feb 3, 2022
A UIActivityViewController to share images while displaying them as a nice preview.

PSActivityImageViewController Overview This view controller allows you to share an image the same way as a normal UIActivityViewController would, with

Peter Salz 11 Oct 19, 2022
iOS library for quickly displaying images while scrolling

Fast Image Cache is an efficient, persistent, and—above all—fast way to store and retrieve images in your iOS application. Part of any good iOS applic

Path Mobile Inc Pte. Ltd. 8.2k Jan 9, 2023
An extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memory and disk caching for iOS and  Watch.

KFSwiftImageLoader KFSwiftImageLoader is an extremely high-performance, lightweight, and energy-efficient pure Swift async web image loader with memor

Kiavash Faisali 343 Oct 29, 2022
AsyncImageExample An example project for AsyncImage. Loading images in SwiftUI article.

AsyncImageExample An example project for AsyncImage. Loading images in SwiftUI article. Note: The project works in Xcode 13.0 beta (13A5154h).

Artem Novichkov 4 Dec 31, 2021
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations

MapleBacon Introduction MapleBacon is a lightweight and fast Swift library for downloading and caching images. Example The folder Example contains a s

Jan Gorman 335 Nov 1, 2022
GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.

GPUImage 2 Brad Larson http://www.sunsetlakesoftware.com @bradlarson [email protected] Overview GPUImage 2 is the second generation of th

Brad Larson 4.8k Dec 29, 2022
GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal.

GPUImage 3 Janie Clayton http://redqueengraphics.com @RedQueenCoder Brad Larson http://www.sunsetlakesoftware.com @bradlarson contact@sunsetlakesoftwa

Brad Larson 2.4k Jan 3, 2023
An open source iOS framework for GPU-based image and video processing

GPUImage Brad Larson http://www.sunsetlakesoftware.com @bradlarson [email protected] Overview The GPUImage framework is a BSD-licensed iO

Brad Larson 20k Jan 1, 2023
A GPU accelerated image and video processing framework built on Metal.

MetalPetal An image processing framework based on Metal. Design Overview Goals Core Components MTIContext MTIImage MTIFilter MTIKernel Optimizations C

null 1.5k Jan 4, 2023
CameraEngine: The most advanced Camera framework in Swift

CameraEngine THIS REPOSITORY REFACTORED FROM ( https://github.com/remirobert/Cam

Mertcan Bulut 0 Jan 3, 2022
IOS UIImage processing functions using the vDSP/Accellerate framework for speed.

UIImage Image Processing extensions using the vDSP/Accelerate framework.

null 372 Sep 1, 2022
PublisherKit - An open source implementation of Apple's Combine framework for processing asynchronous events over time

Publisher Kit Overview PublisherKit provides a declarative Swift API for processing asynchronous events over time. It is an open source version of App

null 5 Feb 22, 2022
Focus on avatar caching.

Navi Navi is designed for avatar caching, with style. The name of Navi from movie Avatar. Requirements Swift 3.1, iOS 8.0 Swift 2.3, use version 0.5.0

null 114 Jun 30, 2022