From 77c5d18916638c54a3866ccb6848cb608b211382 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期三, 09 十月 2019 15:56:08 +0800
Subject: [PATCH] add resize

---
 csrc/wrapper.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp
index 2643ce0..5d63805 100644
--- a/csrc/wrapper.cpp
+++ b/csrc/wrapper.cpp
@@ -437,6 +437,10 @@
     void *CreateConvertor(const int srcW, const int srcH, const int srcFormat,
                           const int dstW, const int dstH, const int flag){
         AVPixelFormat pix_fmt = AV_PIX_FMT_BGR24;
+        // just resize
+        if (flag == 0){
+            pix_fmt = (AVPixelFormat)srcFormat;
+        }
         auto bridge = new cvbridge(
                 srcW, srcH, srcFormat,
                 dstW, dstH, pix_fmt, flag);

--
Gitblit v1.8.0