How to view gcode thumbnails on PC?
I love the preview thumbnail you get on the Mini. I am wondering if there is any software to view the thumbnails on a PC?
I don't know if this is a standard feature of slic3r or something Prusa have added, but searching google and this forum didn't seem to give any relevant results. At least if I knew the format I could write my own viewer.
Any info appreciated.
The pictures are base64 encoded.
Open the gcode file with a text editor.
Copy the lines between "thumbnail begin ..." and "thumbnail end" and remove the "; " at the start of each line.
Then you can use a tool like this to render the picture.
I think I will write a C# application to view them then.
Pulling the image shouldn't be too bad - the image previews that PrusaSlicer embeds in the gcode files are base64 encoded .png files, like so:
; thumbnail begin 220x124 18444
I think the hardest part of writing the application will be to properly integrate with Explorer to present yourself as the thumbnail handler for .gcode files, guessing it'll be some COM garbage but have not personally tried.
I am going to try today to make a shell extension to show the thumbnails.
I wrote a standalone application, it was quite straightforward. It displays the thumbnail and some other bits of info like the print time. It can also generate the png as separate files, so Windows preview can display them.
It would be much neater with a shell extension, that's one of those things I would like to write but never figured out how. I can think of a few other file types I would like to get a preview for.
I made it work for me (Widnows 8.0 here) and put the code and binary release at https://github.com/jkavalik/GcodeThumbnailExtension
When registered it is used for *.gco and *.gcode files, checks the first 1000 lines to find a thumbnail and if it is present, then it gets the last of them (there can be multiple, my tests shoved two being generated, the first being 16x16px, probably for file-list preview) and returns it as the thumbnail image.
Currently there are no other info extracted but the SharpShell library I used to implement it allows another extensions modifying the tooltips, properties etc. so expected time, filament length and for example profile used might be added later.
Will you be posting the code?
Sorry, don't know what you wrote the app with, but AUTOIT allows the functionality you describe:
Maybe get some ideas or even see if your code can be ported to AUTOIT.
Will you be posting the code?
Sure, I will put it on github.
I googled "gcode viewer" and found a simple on-line app that works very well.
I ran the install from your github link above, and after some of your assistance, I now have images for my gcode files ... which helps me find files much easier ...I really appreciate your efforts !!!
Thank You !!!
Stay Safe and Happy Printing !
sorry, i'm a poor italian, what i need for instal your preciuos dll on my windows7 system?
i try to search server registration manager but i didnt find :,(
Octoprint has a plugin to do this.
Prusa Slicer 2.3.0 has a gcode viewer that rides along with the slicer. No more searching for some 3rd party app or website viewer.
many thanks @javalik for your fast answer, great!
in late night yestrday i'm find that and try to install, but didn't work....i must work on it i think
@tim, i don't sure that preview run in windows explorer...
sorry to all for my italian english
@tim i mean don't generate thumbnails in explorer...
If you install 3D Builder from teh Windows App store, it builds 3D previews in explorer. But the app must own the extension.
If you want to preview gcode files - examine how they build when printing - Prusa Slicer 2.3.0 has that capability (2.2.0 does not).
Here's both in play: