Yes, up to version 1.2.1 it is not possible to load maps bigger than 2000x2000 pixel, more or less.
This is due to the maximum heap size set for FreeTrack... I have tried to increase that to 64mb and i was able to load a 3015x2100 pixel jpg.
What puzzles me is that loading that file took some 32mb of memory of my 5800... This is a LOT and almost the double of what is supposedly required to load that image. Why is this? I am already using a QImage, which is supposed to be better than QPixmap for this job...
Update:No, QImage its the best choice... QPixmap will not even load such a 3015x2100px image. But how about converting the image to 8/16bit after loading, to save memory?
Update: that helps... But since Qt will not (damn!) release the memory, i end up eating all the phone memory again soon. The only real solution is to create a class BuffereImage which internally uses QImageReader and some clipping/scaling before loading the image itself. In this way, we could teoretically manage ANY size of images.
With speed issues in mind, of course...
Nessun commento:
Posta un commento