You can do loadstring() on the image and then return length().
I never managed to get loadstring() to work, though (but I never put more then a few minutes into trying).
I personnally can hardly wait for the next client version so I can loadlines() an image clientside!
