Cannot create certain amount of TPortableNetworkGrapic instances
Original Reporter info from Mantis: Week of the agents
-
Reporter name: WOTAGaming
Original Reporter info from Mantis: Week of the agents
- Reporter name: WOTAGaming
Description:
I'm developing game that use many PNGs sprites for drawing on TCanvas. I have array of 32 tilelists which are I am cutting into small tiles to 512 from every of them. I have PNGs besides those.
I use TLazIntfImage as intermediary to create and fill PNG object. And upon reaching some certain quantity of sprites inside TPortableNetworkGrapic.LoadFromIntfImage and then TLazIntfImage.CreateBitmaps program raise an silent error 'Failed to create handles'. Silent means application just freezes, but I find error in this point. CreateBitmaps sets new handla as 0.
When I use another method (not cutting pics into sprites and use TCanvas.ClipRect instead of TCanvas.Draw) it works, because I decrease amount of pictures. But this method decreases FPS, so I cant use it everywhere.
Steps to reproduce:
Try to create so many PNGs as possible through converting from TLazIntfImage.
Mantis conversion info:
- Mantis ID: 35963
- OS: Windows
- OS Build: 7, 10
- Platform: Windows
- Version: 2.0.4