CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

EKTilesMaker 0.1.0

EKTilesMaker 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Evgeniy Kirpichenko.



  • By
  • Evgeniy Kirpichenko

EKTilesMaker

Simple iOS utility that slices provided original image onto tiles. Tiles may be used for displaying large images on different detalization levels.

You can find example of tiles usage in EKTilesMakerDemo project that is very similar to Apple's PhotoScroller sample.

Usage

  1. Create instance of EKTilesMaker class.
  2. Provide source image file and output folder paths.
  3. Set tile name.
  4. Add zoom levels for which tiles should be created.
  5. Set tiles size and format.
  6. Provide completion block.
  7. Call createTiles method.
  8. Get your tiles from output folder.

      
    EKTilesMaker *tilesMaker = [EKTilesMaker new];  
    
    NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"photo" ofType:@"jpg"];
    [tilesMaker setSourceImagePath:imagePath];
    [tilesMaker setOutputFolderPath:self.tilesFolderPath];
    [tilesMaker setOutputFileName:kTileName];
    [tilesMaker setZoomLevels:@[@1, @0.5, @0.25, @0.125]];
    [tilesMaker setTileSize:CGSizeMake(256, 256)];
    [tilesMaker setOutputFileType:OutputFileTypePNG];
    [tilesMaker setCompletionBlock:completion];
    
    [tilesMaker createTiles];
    

Example

Original image from demo project can be sliced onto 6 parts for 0.125 zoom level and 256x256 tiles size.

Original image

Alt text

Tiles

Alt text. Alt text. Alt text
Alt text. Alt text. Alt text

Bitdeli Badge