Creates tiles (256x256) for all zoom levels of a large image
Can use those tiles to render efficiently based on the zoom level. Provide offsetX and offsetY as you would for the full image size!
Note: This code was generated with the help of ChatGPT: https://chatgpt.com/share/581bbfff-512b-486f-9cd6-495a73d5c57b