Memory management w/ large images
jonmulcahy
Member, Sous Chef Posts: 10,408
I've got some questions about memory management with large images. I've got 4 notices that popup when you die, and I mistakenly make them all seperate. Each one was taking up a 1024x1024 memory space, so I'm going through and combining them into one. But I had a thought.
Would it be better to have them initially set to a 10x10 blank PNG and only change the image to the large image when needed? If I switched back to the 10x10 png after displaying the notice, would that release the memory?
Or
would it be better to split the image up into smaller segments? I could get away with 3 images, one about 200x600, another 200x400 and one 200x200 (these are just estimates). Basically, does 4 512x512 images take up the same, less or more memory space than 1 1024x1024 image?
Would it be better to have them initially set to a 10x10 blank PNG and only change the image to the large image when needed? If I switched back to the 10x10 png after displaying the notice, would that release the memory?
Or
would it be better to split the image up into smaller segments? I could get away with 3 images, one about 200x600, another 200x400 and one 200x200 (these are just estimates). Basically, does 4 512x512 images take up the same, less or more memory space than 1 1024x1024 image?
Comments
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
possibly because the way our computers read images doing a line-thru on one image is more efficient than doing 4 line-thrus on 4 images simultaneously... it's less complex a task... Tho computer works in nanoseconds and all seems instantaneous.
MH