See rtw_stb_image.h. The fdata member is a class variable, but is really needed only for the load function. It should be local to the load function, and the members image_width and image_height need not reference it. This saves a bit of memory after the image data is loaded.