Image size calculations using threads