BufferedImage overloaded when loading large image file.
sync667 opened this issue ยท 6 comments
Hello, i use last at this moment TC version 138 and Spigot 1465. We try to generate world bigger then 100k x 100k. So we prepared image png that have about 10MB. And TC can't handle that because of int max value.
Full error log:
http://pastebin.com/u7zkBeBN
We must get it working so we are ready to help with coding fix for that if needed.
Thanks for help :)
I think the easiest way to handle that would be use many png files and add only proper data quota to generator or use library for png that can handle bigger files.
Your image is uncompressed bigger than 4GB, so TC cannot load it. As you said, we would need to split up the image.
Keep in mind that each pixel is 4x4 blocks, so an image of 2000x2000 pixels will already spawn 8000x8000 blocks.
@rutgerkok It's any way that we can do it? Yea of course we know long time ago that 4x4 is 1x1px ;) but we want to develop one of the most biggest worlds in MC in size more then 100k x 100k blocks.
Theoretically, yes, but I'm not going to code it. It's a lot of work, it will make the image reading code of TerrainControl much more complicated (so more difficult to maintain), etc. It will also only be useful to very few people.
So maybe any tool to connect many that big parts in one map? Any machine will handle that or it's much to do to get it working.
Connecting two worlds is easy: just pick the .mca files in the region folder that you want and put them in one world. Generating the right mca files is the difficult part; you'd need to cut up the image into smaller parts, and generate worlds based on the smaller images. Maybe splitting up the image into four quadrants will work?