From bcf53ee9961ae69df7dadbd6f73f7c3407a26e0b Mon Sep 17 00:00:00 2001 From: Emil Rosenquist Date: Mon, 12 Apr 2021 12:05:07 +0200 Subject: [PATCH] When parsing image packet read image data with image size. --- qtm/packet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qtm/packet.py b/qtm/packet.py index 336ddd6..be67b52 100644 --- a/qtm/packet.py +++ b/qtm/packet.py @@ -506,7 +506,8 @@ def get_image(self, component_info=None, data=None, component_position=None): component_position, image_info = QRTPacket._get_exact( RTImage, data, component_position ) - append_components((image_info, data[component_position:-1])) + append_components((image_info, data[component_position:component_position + image_info.image_size])) + component_position += image_info.image_size return components @ComponentGetter(QRTComponentType.Component3d, RT3DComponent)