Skip to content

Commit e1a97f6

Browse files
Add scripts/convert_raw_to_png.sh
1 parent e40fe8f commit e1a97f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/convert_raw_to_png.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
inputfile="$1"
2+
if [ -z "$inputfile" ]; then
3+
echo "Usage: $0 inputfile"
4+
echo "Example: $0 camera_capture_1764503331_960x960_GRAY.raw"
5+
exit 1
6+
fi
7+
8+
outputfile="$inputfile".png
9+
echo "Converting $inputfile to $outputfile"
10+
11+
# For now it's pretty hard coded but the format could be extracted from the filename...
12+
convert -size 960x960 -depth 8 gray:"$inputfile" "$outputfile"

0 commit comments

Comments
 (0)