philips / supernote-obsidian-plugin

Supernote A5, A5X, A6X, A6X2 (Nomad) integration for Obsidian. Generate markdown, capture screen mirror, and more.
MIT License
137 stars 7 forks source link

Notes in horizontal orientation appear to be parsed incorrectly #27

Open james-xli opened 6 months ago

james-xli commented 6 months ago

Notes that were created on a Supernote in the "horizontal" orientation appear to be parsed incorrectly by the plugin. Recognized text appears fine, but the image of the note looks corrupted.

I'm attaching a test .note file here (as .zip file so that Github will accept it): horizontal.note.zip

Here is the PNG export of this note from the Supernote, to show what it is supposed to look like: horizontal_Page_1

Here is how it looks in Obsidian: image

It's interesting that the image is messed up horizontally, but the vertical relationship of the things on the page is maintained. It seems like the 1872x1404px data of the horizontal note is being shown in the 1404x1872px resolution of a vertical note, so the pixels overflow across rows.

The image also still looks corrupted after using the Obsidian plugin to export to PNG.

I'm guessing this might be an issue in the underlying supernote-typescript library? Maybe there's some flag in the .note file format or something that identifies when a note is supposed to be horizontal...

Steps to create a new .note file to reproduce this issue:

  1. On the Supernote, open the "Create New Note" window
  2. Either "Standard" or "Real-Time Recognition" types will reproduce this issue.
  3. Under "Templates," select "Horizontal"
  4. Create the .note, write in it, and sync to Obsidian vault as normal.
philips commented 6 months ago

Yeah that is 100% a library issue. There are zero examples of horizontal notes in the unit tests