Convert Matplotlib Plot To Opencv Image Resizer