Processing image using a ruby Module