Transcoding is really from any image format
This commit is contained in:
parent
bf49a86e98
commit
2847ed270f
@ -46,12 +46,22 @@ transcode-video-4K() {
|
|||||||
ffmpeg -i $1 -c:v libx265 -preset slow -crf 24 -c:a aac -b:a 192k ${1%.*}-optimized.mp4
|
ffmpeg -i $1 -c:v libx265 -preset slow -crf 24 -c:a aac -b:a 192k ${1%.*}-optimized.mp4
|
||||||
}
|
}
|
||||||
|
|
||||||
# Transcode PNG to JPG image that's great for shrinking wallpapers
|
# Transcode any image to JPG image that's great for shrinking wallpapers
|
||||||
transcode-png2jpg() {
|
img2jpg() {
|
||||||
magick $1 -quality 95 -strip ${1%.*}.jpg
|
magick $1 -quality 95 -strip ${1%.*}.jpg
|
||||||
}
|
}
|
||||||
|
|
||||||
# Transcode PNG to JPG image that's great for sharing online without being too big
|
# Transcode any image to JPG image that's great for sharing online without being too big
|
||||||
transcode-png2jpg-1080() {
|
img2jpg-small() {
|
||||||
magick $1 -resize 1080x\> -quality 95 -strip ${1%.*}.jpg
|
magick $1 -resize 1080x\> -quality 95 -strip ${1%.*}.jpg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Transcode any image to compressed-but-lossless PNG
|
||||||
|
img2png() {
|
||||||
|
magick "$1" -strip -define png:compression-filter=5 \
|
||||||
|
-define png:compression-level=9 \
|
||||||
|
-define png:compression-strategy=1 \
|
||||||
|
-define png:exclude-chunk=all \
|
||||||
|
"${1%.*}.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user