Better image resize

Image resize with gamma correction.