Generate tiles from large photos (iOs PhotoScroller)

后端 未结 3 1536
耶瑟儿~
耶瑟儿~ 2021-02-06 16:30

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

相关标签:
3条回答
  • 2021-02-06 16:49

    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.

    0 讨论(0)
  • 2021-02-06 16:50

    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.

    0 讨论(0)
  • 2021-02-06 16:54

    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.

    0 讨论(0)
提交回复
热议问题