-
Notifications
You must be signed in to change notification settings - Fork 64
RSDK-1623 - decode custom depth mime type #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-1623 - decode custom depth mime type #280
Conversation
nit: PR name should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
||
width = int.from_bytes(self.data[8:16], "big") | ||
height = int.from_bytes(self.data[16:24], "big") | ||
depth_arr = array("H", self.data[24:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised you dont specify the endianness of these unsigned shorts but you do for the other values.
Co-authored-by: Naveed Jooma <naveed@joo.ma>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good, could you just add some explicit checks to the tests as well
Looks like you are covered here, I will un assign myself so there aren't too many cooks 👨🍳 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
RSDK-1623
GetImage might return a custom MIME type, but for a user to use the data, they need to turn the data into a standard representation.
Changes:
data/
where we store a fake image