Image processing: optimization, cropping/resizing, and spriting