Using cast insted of function to calculate image size

Using casting int instead of intval function is faster in calculating image size
Merge pull request #9 from acidvertigo/patch-8

Using cast insted of function to calculate image size