I\'m studdying the WWDC session #104 for mastering UIScrollViews. I need to create a script or find a tool or write a script to generate the tiles needed for th
I'm using two tools--Tilen for chopping up the image, which unfortunately starts tile numbering at 1, and then Better Rename for adjusting the tile numbering and adding appropriate prefixes and suffixes to the names. Together they do a great job.
This script will automatically generate all the tiles you need at all the different resolutions:
http://www.mikelin.ca/blog/2010/06/iphone-splitting-image-into-tiles-for-faster-loading-with-imagemagick/
A small heads up: that script will name everything with 100, 50, etc. scale factors rather than 1000, 500, etc. you can adjust for this by changing 1000 to 100 in the tileForScale: method in TilingView.m in the PhotoScroller example.
I was also looking for a tool to generate tiles and found out Photoshop (CS3 or later) includes an option to create JPEG tiles for a tool called Zoomify. From the menu choose File > Export > Zoomify... and in 'Browser Options' fill in the tileSize of 256 x 256 pixels.
After clicking [OK] a folder TileGroup0 will be created with the 256 pixel tiles.
The files are named: zoomlevel-column-row.jpg
, whereas Photoscroller's example files are named filename_scale_column_row.png
(the 0-0-0.jpg
file can be discarded). So rename the jpg-files accordingly (1- = 125_, 2- = 250_, 3- = 500_
, etc.) or just fix tileName
in tileForScale:row:col:
(TilingView.m) to load the correct jpg file.