Pyxel Edit Forum Archive
ArchiveBug reports

Importing large tiled images causes program to hang indefinitely

W
wtf_dragon
Feb 3, 2014 at 4:24 pm
Hi there!

I've been trying to import this image -- a 16384x16384 PNG map comprised of 16x16 tiles -- into the latest PyxelEdit build using the "Import Tiled Image" menu option.

And unfortunately, this causes PyxelEdit to hang. This happens right at the outset, during (I assume) the image load proper. All I see is the blank PyxelEdit interface.

Ultimately, what I'd like to be able to do is to import this image and use PyxelEdit to break it up into a tileset, and then ideally import that tileset and the resulting map into Unity. But obviously, I need to get the image imported first...thoughts?
Danik
Feb 3, 2014 at 8:40 pm
Hi there,
I suspect there is a limit to the size of bitmaps set by the Air runtime. It used to be limited at 8000 something pixels, but should now be limited by the amount of memory available. Still I have had problems allocating very big bitmaps.
The image you tried to load should take about 1GB of memory, but Pyxel keeps multiple buffers of this size for technical reasons. I will have to investigate what the problem is more precisely and see if images this big can be supported. At the very least there should be an informative error message instead of hanging.
W
wtf_dragon
Feb 6, 2014 at 5:26 am
I tried a 4096x4096 image (from the same site as the other image), and it imported and broke into tiles just fine. So that resolution works, at least. Hopefully it's not a limitation within Air proper, and is instead an allocation issue that can be fixed.

Failing that...I suppose I could subdivide the map for import and tiling, and then see if I couldn't contrive a way to join it back up in Unity, if not in PyxelEdit.