You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote my own binary gcode parser ThumbnailBinaryGCode.m because your sample code core.cpp had too many dependencies for me to get it to compile. In that core.cpp, block_parameters_size() claims that the block header for a Thumbnail block is longer than the others by two sizeof(uint16_t). This matches what the thumbnail spec says, but it isn't actually true.
In reality, a thumbnail block, is the same length as all the other blocks. The following data is either a PNG file, a QOI file, or a JPG file. Following the compressed data are 4 bytes that I don't know what they are, and the next block starts after that. (both PNG and QOI start with a 4 byte magic number, then the width and height.
Since core.cpp doesn't actually try to show the thumbnail, that code doesn't detect the error.
Please correct the thumbnail spec to say that there is a single sizeof(uint16_t) parameter at the end of the block, then the uncompressed data of the thumbnail, then 4 bytes of ?what?, and then the next block.
The text was updated successfully, but these errors were encountered:
I wrote my own binary gcode parser ThumbnailBinaryGCode.m because your sample code
core.cpp had too many dependencies for me to get it to compile. In that core.cpp, block_parameters_size() claims that the block header for a Thumbnail block is longer than the others by two sizeof(uint16_t). This matches what the thumbnail spec says, but it isn't actually true.
In reality, a thumbnail block, is the same length as all the other blocks. The following data is either a PNG file, a QOI file, or a JPG file. Following the compressed data are 4 bytes that I don't know what they are, and the next block starts after that. (both PNG and QOI start with a 4 byte magic number, then the width and height.
Since core.cpp doesn't actually try to show the thumbnail, that code doesn't detect the error.
Please correct the thumbnail spec to say that there is a single sizeof(uint16_t) parameter at the end of the block, then the uncompressed data of the thumbnail, then 4 bytes of ?what?, and then the next block.
The text was updated successfully, but these errors were encountered: