Reducing images (useless black borders and RGB to indexed colors)