Notifications
Clear all

[Closed] Refreshing bitmaps from disk

So say I have a rollout that uses imgtag to load a bitmap into my ui. I then resize the bitmap using an external program. I now refresh the UI. Instead of grabbing the new image from disk, it seems to frequently grab the one it had in memory. Is there a good way to dump all of the bitmaps that the rollout has in memory forcing it to regrab the one on disk with the new size?

  • Neil
4 Replies

Oh, and forget to mention, freeSceneBitmaps() doesn’t seem to do the job BTW.

  • Neil

Will not help you much, but this is from the Max 2015 MXS docs “Whats new” section

New Bitmap Value Functions And Enhancements
The new function forceReloadBitmapFile() lets you reload the file of a Bitmap Value.

The new function registerFileChangedFunction() lets you register a callback to run a function when the bitmap file of a Bitmap Value changes on disk.

other than that, the following works for me
Next time the rollout is created, it picks the updated bitmap

free bm
gc()

Well, I hate to use the giant hammer of gc(), but you’re right, it does work. Guess I’ll have no other choice till max 2015, but thanks for the info on the new functions, those will come in handy.

  • Neil

maybe using the tack hammer works too, but did’nt test it …

gc light:true