Changed int to long for bigger images