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.
RE: How to view gcode thumbnails on PC?
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.
RE: How to view gcode thumbnails on PC?
I think I will write a C# application to view them then.
RE: How to view gcode thumbnails on PC?
@bobcousins
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
; iVBORw0KGgoAAAANSUhEUgAAANwAAAB8CAYAAAACRt5vAAA10ElEQVR4Ae2dZ3RcxdnH9UISEhLOgQ
; MkBGyMG264SraK1aurJEvucpMty5bcjRumGGyKDcY0Y2NjMKYGHDDVYIMLJZDwQhpvck76t+QjOTn5
...snip...
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.
RE: How to view gcode thumbnails on PC?
I am going to try today to make a shell extension to show the thumbnails.
RE: How to view gcode thumbnails on PC?
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.
RE: How to view gcode thumbnails on PC?
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.
RE: How to view gcode thumbnails on PC?
@bobcousins
Will you be posting the code?
RE: How to view gcode thumbnails on PC?
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.
Normal people believe that if it ainât broke, donât fix it. Engineers believe that if it ainât broke, it doesnât have enough features yet.
RE: How to view gcode thumbnails on PC?
Googling around I found this http://gcode.ws/ I don't normally like online apps but it seems to work.
RE: How to view gcode thumbnails on PC?
@bobcousins
Will you be posting the code?
Sure, I will put it on github.
RE: How to view gcode thumbnails on PC?
I googled "gcode viewer" and found a simple on-line app that works very well.
RE: How to view gcode thumbnails on PC?
@jkavalik
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 !
RISPONDI: How to view gcode thumbnails on PC?
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 :,(
RE: How to view gcode thumbnails on PC?
@oltre81
Simplest should be downloading the 'v1.0.zip' from https://github.com/jkavalik/GcodeThumbnailExtension/releases/tag/v1.0
That contains all the necessary files.
RE: How to view gcode thumbnails on PC?
Octoprint has a plugin to do this.
RE: How to view gcode thumbnails on PC?
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.
RISPONDI: How to view gcode thumbnails on PC?
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
RISPONDI: How to view gcode thumbnails on PC?
@tim i mean don't generate thumbnails in explorer...
RE: How to view gcode thumbnails on PC?
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: