Updated to use go's image package