It is (as far as I know) not possible to resize, blur, or do any other arithmetic on images in OpenCV. This repository provides the missing code needed: transformations from sRGB to linear and back. This takes the gamma into account.
For an explanation and a lot more information about the problem, see
Code is available in C++ and Python.