Latest 0.1.0
Homepage https://github.com/jonhocking/SmoothImageLoading
License MIT
Platforms ios 6.0, requires ARC
Frameworks UIKit, ImageIO
Authors

Smooth Image Loading

This is a set of UIImage and UIImageView categories to help you load images in smoothly, and to help you hit that 60FPS mark.

It’s specifically designed for large images that you’ve downloaded and need to display at a smaller size.

You should use this if:

  • You’re seeing ‘the pop’ when your images scroll into view
  • You’re displaying large images at a smaller frame size
  • You keep getting memory warnings because of your image usage

Features

  • Background thread image decompression
  • Lightweight caching based on filename
  • Lighter the memory footprint of images

Installation

The best way to install this is via cocoapods

Just add SmoothImageLoading to your pod file and you’re away.

Why is the memory usage so much lower?

I use the ImageIO framework to render large images out at the exact size needed. This is a lot different to the usual Core Animation scaling you get when setting a big image in a small frame.

The big upshot of this comes when you’re scrolling or animating the images as you no longer have to shift around and dump wasted pixels and memory with every frame.

What kind of benefits can I expect to see?

As an example, I was able to take a 5000×2500 image, rendered at 320×160, and improve the FPS from 2 to 60 in a table view of 100 images. The memory usage went from ~300mb to 10.5mb (caching off, 22mb with caching enabled).

Both of these are big improvements :)

If you want to talk to me about any of this then hit me up on Twitter – I’m @jonhocking

Latest podspec

{
    "name": "SmoothImageLoading",
    "version": "0.1.0",
    "summary": "Designed to help render large images with high FPS.",
    "description": "This is a set of UIImage and UIImageView categories to help you load images in smoothly, and to help you hit that 60FPS mark.nnIt's specifically designed for large images that you've downloaded and need to display at a smaller size.nn__You should use this if:__nn- You're seeing 'the pop' when your images scroll into viewn- You're displaying large images at a smaller frame sizen- You keep getting memory warnings because of your image usagennn## Featuresnn- Background thread image decompressionn- Lightweight caching based on filenamen- Lighter the memory footprint of imagesnn",
    "homepage": "https://github.com/jonhocking/SmoothImageLoading",
    "license": "MIT",
    "authors": {
        "Jon Hocking": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jonhocking/SmoothImageLoading.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/jonhocking",
    "source_files": "*.{h,m}",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "frameworks": [
        "UIKit",
        "ImageIO"
    ]
}

Pin It on Pinterest

Share This