DavidPhillipOster / ThumbHost3mf

A macOS app that hosts a thumbnail provider that makes the Finder displays the thumbnails built in to some .gcode and .3mf files.
Apache License 2.0
115 stars 2 forks source link

possible binary gcode compatibility #1

Closed Hl2run closed 11 months ago

Hl2run commented 11 months ago

Hello,

would you be so kind and can you have a look at possible compatibility update for new binary gcode format?

https://hackaday.com/2023/11/28/g-code-goes-binary-with-proposed-new-format/

Thank you.

DavidPhillipOster commented 11 months ago

Good point. To fix this, my Quicklook plugin needs:

DavidPhillipOster commented 11 months ago

I've updated the source code to add:

and at this point, everything that used to work still works, and in addition .gcode files with QOI format thumbnails also work.

binary gcode files work as expected with open in the ThumbHost3mf wrapper app: showing the thumbnail in the ThumbHost3mf window, but Quicklook doesn't seem to want to give my plugin a chance to generate the icon.

I'm still working on this. At least the ThumbnailBinaryGCode.m does a good job of extracting the thumbnail data from binary gcode files, and QOIFImageFromData.m does a good job of turning QOI data into an NSImage.

DavidPhillipOster commented 11 months ago

I found the bug: my ThumbnailProvider.m explicitly checks filename suffixes. Once I'd added the code to recognize .bgcode, it worked as it should. All folded into the 1.2 release. Thanks for the bug report!

Hl2run commented 11 months ago

Amazing! Thank you!