Size on disk or size when shown?
Size on disk is easy, just ake a system call to querry its size. Its not much use other than guestimating disk usage. As the file size on disk does not correlate to the amount fo memory it uses rendering. Wich really cant be known if its a bot or map file. Other then that it uses up width(rounded to nearest multiple of 2)height(rounded to nearest multiple2)bitdepth*channels.
So no i dont really see much use for such a funtionality even to guesstimate other thing that how much you sue disk in game engines. And in caese of DDS how much vide memoy they end up using. (bit not true for formats liek png, tif, giff iff or other than that.)
So no not uch use for any technical analysyis.