We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e1ceba commit 94393e2Copy full SHA for 94393e2
1 file changed
rosboard/compression.py
@@ -146,10 +146,10 @@ def compress_compressed_image(msg, output):
146
stride = int(np.ceil(max(img.shape[0] / 800.0, img.shape[1] / 800.0)))
147
img = img[::stride,::stride]
148
img_jpeg = encode_jpeg(img)
149
+ output["_data_jpeg"] = base64.b64encode(img_jpeg).decode()
150
+ output["_data_shape"] = list(original_shape)
151
except Exception as e:
152
output["_error"] = "Error: %s" % str(e)
- output["_data_jpeg"] = base64.b64encode(img_jpeg).decode()
- output["_data_shape"] = list(original_shape)
153
154
155
def compress_image(msg, output):
0 commit comments