I have an app built for mac and windows that draws large bitmaps. (upto 32k x 32k). Mac version is fine however PC version throws a runtime error at anything over 8k pixels wide. The reported error is…
Not that this is very useful but it sounds familiar… <https://xojo.com/issue/46551>
In my case the bitmaps are not that big, and it takes some time and perhaps low memory situations to trigger it.
At a guess, as Xojo is using D2D now, it might be graphics card memory dependent. This could be tested by making a build in 64bit and see if it works or not. If it is the case I don’t think Xojo has given us a way to use software rendering to keep away from that limitation (not checked as I’ve not had the need to look).
Continuing these thoughts, a method with the name CreateBitmapFromWicBitmap may mean that there are two copies of the data in memory at the same time, doubling the required footprint. Ill ask William to comment.
Xojo does some internal “caching”, which causes Pictures to use more memory
See also <https://xojo.com/issue/54421>: Significantly increased memory consumption when putting images in array in Windows
Right, that is the unfortunate reality here, creating a 64-bit app may help. Before we get side tracked into the technical details though, please note that we carefully consider the consequences of our design. In this particular case speed trumps memory footprint.
Sure - but certainly makes sense in many situations.
However:
Having such a big Picture 2x (or even more - i don’t know the Framework’s internals) in Memory doesn’t make sense. For such a big Picture, memory trumps speed
Maybe the Framework could only use it’s Buffer if the Picture is “not too big”…?