jya-dev / supernote-tool

Unofficial python tool for Supernote
Apache License 2.0
255 stars 27 forks source link

Extract pen strokes from .note #31

Open Bootstrap360 opened 1 year ago

Bootstrap360 commented 1 year ago

Hello @jya-dev

Thank you for your contribution. I have spend a few hours poking around your source code and using the debugger to try and find where I can extract the list (x, y) values for each layer inside the .note file.

The closest I have gotten is the get_totalpath but I do not know how to dedecode this data.

francescoboc commented 9 months ago

I would also be interested in this, as it seems that the --pdf-type vector option is not using the actual pen strokes but rather tracing the png. So basically we are going from vector (original pen strokes) -> to raster (png conversion) -> to vector again, which seems unnecessary! Amazing tool btw!

jya-dev commented 4 months ago

Hi, As you suggest, I too believe that toolpath has the original pen strokes. When I look inside the toolpath data in a binary editor there are areas that clearly look like coordinate data, but I haven't yet found a way to parse this properly.

mmujynya commented 1 month ago

@jya-dev, I used your library as a basis of my own tools and have since unveiled some of the structure behind totalpath. See my last videos about a text to pen strokes tool below. None of that would have been possible without your work. https://youtube.com/playlist?list=PLO0R0numVXGXooMYGTEuUKE2GsAKEc127&si=5NdSg19mWRwP9fK1

jya-dev commented 1 month ago

@mmujynya, Great, thanks for letting me know. I'll check it out.

mmujynya commented 1 month ago

Happy to share what I know. It would be much more useful for the community to have the tools to extract and manipulate pen strokes in your project.