added gzip func to pngizer
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# PNGizer: convert any file into PNG image and back
|
||||
# Depends on mktemp, tar, ImageMagick and pngcrush
|
||||
# Depends on mktemp, tar, gzip, ImageMagick and pngcrush
|
||||
# Created by Luxferre in 2026, released into public domain
|
||||
|
||||
# Convert any raw data file to PNG
|
||||
@@ -43,7 +43,7 @@ pngize() {
|
||||
[ -z "$2" ] && ofile="$1.png"
|
||||
temp_arch="$(mktemp)"
|
||||
# containerize the input
|
||||
tar cf $temp_arch "$1"
|
||||
GZIP=-9 tar czvf $temp_arch "$1"
|
||||
# run the conversion
|
||||
pngize_raw $temp_arch $ofile
|
||||
rm -f $temp_arch
|
||||
@@ -55,7 +55,7 @@ pngize() {
|
||||
unpngize() {
|
||||
temp_arch="$(mktemp)"
|
||||
unpngize_raw "$1" $temp_arch
|
||||
tar xf $temp_arch
|
||||
gzip -dcq $temp_arch | tar xvf -
|
||||
rm -f $temp_arch
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user