Added read/write support for image blobs#52
Open
yannickulrich wants to merge 3 commits into
Open
Conversation
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for the native image insertions in notebooks on 3.27 or later. It is similar to PR #51 but parses the whole object rather than just the filename. The construction is based on remarkable-shapes which already has this ability in ruby.
On the top-level, images are defined in a
SceneImageInfoBlock(SceneAssetBlockin #51, block type0x0E) via a UUID. They can have a flag which currently always evaluates to[17, 0]. They are then references in the tree as aSceneImageItemBlock(ScenePathItemBlockin #51, block type0x0F, item type0x07). This uses the UUID defined earlier and includes image placement as a list of image vertices (x, y, u, v tuples)I have so far made no attempt at parsing this further since it should probably be done by rmc instead. The image block also contains a magic sequence of integers.
I have verified that this can read and write files generated by the remarkable and the remarkable-shapes library but haven't added any pytests yet.
Side note: I've also added a
read_lww_bytesfunction for the image flag and the UUID when referenced in theSceneImageItemBlock. There's probably a better way of doing this but I couldn't find one quickly.