When developing cocos-2d, I learned some knowledge:
On iOS, the image is automatically scaled to the Npower of 2. For example, a 1024*1025 image occupies the same memory as a 1024*2048 image. The formula for calculating the memory used by the image is: length * width * 4. In this case, the memory occupied by 512*512 is 512*512*4 = 1 m. Other dimensions, and so on. (PS: the maximum size supported on iOS is 2048*2048 ).
Native SDK development provides some solutions for pasting large charts, including photoscroll and scrollviewsuite code.
The image Cutting Tool https://github.com/jlamarche/tile-cutter.
The image cropping method of imagemagic is similar to that of photoscroll. The command is as follows:
Convert bigimage.png-crop 256x256-set filename: tile "% [FX: page. */256 + 1] _ % [FX: page. y/256 + 1] "+ repage + adjoin" tile_25 _ % [filename: tileapps.png"
Add the parameter-resize 25% when scaling is required.