mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 00:56:57 +00:00
demos/run_script.sh: fix ImageMagick invocation
Because of changes to ImageMagick, the previous demos update increased the png file sizes significantly. This is the fix.
This commit is contained in:
parent
a9df7a1339
commit
d2667c52ec
1 changed files with 7 additions and 10 deletions
|
@ -65,16 +65,13 @@ for script in "$@"; do
|
||||||
#
|
#
|
||||||
# `-resize 100%` is a no-op. `-resize 700x10000`` would make the width 700 px
|
# `-resize 100%` is a no-op. `-resize 700x10000`` would make the width 700 px
|
||||||
# and preserve aspect ratio.
|
# and preserve aspect ratio.
|
||||||
|
#
|
||||||
|
# (!) The order of operations is important and confusingly different from what
|
||||||
|
# would happen to a PNG with transparency. If editing this, it might help to
|
||||||
|
# look at https://github.com/ImageMagick/ImageMagick/discussions/7600
|
||||||
which magick > /dev/null \
|
which magick > /dev/null \
|
||||||
&& magick "$script_base".svg \
|
&& magick -background black "$script_base".svg \
|
||||||
-colors 63 -background black -resize 100% \
|
-type Palette -colors 63 -resize 100% \
|
||||||
"$script_base".png \
|
"$script_base".png \
|
||||||
|| true
|
|| true
|
||||||
# TODO/FIXME: The above command doesn't seem to work properly;
|
|
||||||
# the PNG files end up larger than they should be and are RGB
|
|
||||||
# as opposed to expected indexed 63-color. This is caused by
|
|
||||||
# https://github.com/martinvonz/jj/commit/6d573ef6d7a45151495de18b6f4c5063ce39f6bd
|
|
||||||
# and
|
|
||||||
# https://github.com/martinvonz/jj/commit/42dee7d08ce8e362cf9d44f844b25e001b6ac94f
|
|
||||||
# and needs debugging of ImageMagick invocations.
|
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue