-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
gcode-preview | ||
============= | ||
|
||
Extract images as png/jpg from .gcode files with C or Bash | ||
|
||
|
||
Building and installing the C version | ||
------------------------------------- | ||
|
||
1. clone this repository locally on your machine | ||
2. run `make clean && sudo make install` from within the repository folder | ||
|
||
|
||
Which is faster? | ||
---------------- | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "illegal number of parameters. You should specify an input .gcode file and an output png/jpg file" | ||
fi | ||
|
||
sed -n '/thumbnail begin/,/thumbnail end/p;' "$1" | sed '$d;1d; s/^; //;' | sed -z "s/\n//g" | base64 -d - > "$2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters