Skip to content

Commit 047857a

Browse files
amalnanavatibjsowa
andauthored
Fixed output resize bug (#130)
Co-authored-by: Błażej Sowa <[email protected]>
1 parent cbdf983 commit 047857a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/image_streamer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ void ImageTransportImageStreamer::imageCallback(const sensor_msgs::ImageConstPtr
112112
int input_width = img.cols;
113113
int input_height = img.rows;
114114

115-
116-
output_width_ = input_width;
117-
output_height_ = input_height;
115+
if (output_width_ == -1)
116+
output_width_ = input_width;
117+
if (output_height_ == -1)
118+
output_height_ = input_height;
118119

119120
if (invert_)
120121
{

0 commit comments

Comments
 (0)