I want to save an image using opencv's imwrite
without any extension. I know image format in cv2.imwrite
is chosen based on the filename
extension. Is there a way to specify the compression format while calling the function, or would I have to rename the file once created?
cv2.imwrite(filename, img)
[Out]: /home/travis/miniconda/conda-bld/work/opencv-3.1.0/modules/imgcodecs/src/loadsave.cpp:459: error: (-2) could not find a writer for the specified extension in function imwrite_