diff --git a/src/image_streamer.cpp b/src/image_streamer.cpp index bbe45bb..2981557 100644 --- a/src/image_streamer.cpp +++ b/src/image_streamer.cpp @@ -112,9 +112,10 @@ void ImageTransportImageStreamer::imageCallback(const sensor_msgs::ImageConstPtr int input_width = img.cols; int input_height = img.rows; - - output_width_ = input_width; - output_height_ = input_height; + if (output_width_ == -1) + output_width_ = input_width; + if (output_height_ == -1) + output_height_ = input_height; if (invert_) {