changed image calculations