Fix halve1DImage and rename variables