Ignore & clean up failed SVG thumbnails
When building Tux Paint, ImageMagick's `convert` might fail to generate thumbnail PNGs for some Starter SVG images (e.g., "manatee.svg"), with a "too many bezier coordinates" error. This did not happen before, and does not happen with newer versions of ImageMagick; there was a regression fixed in 2018: https://github.com/ImageMagick/ImageMagick/issues/1069 However, it's occurring in Ubuntu 20.04 'focal' (I've got version "6.9.10-23 Q16 x86_64 20190101"). Therefore, as a quick-fix, simply ignoring errors from `convert`, and removing the (bogus) PNG thumbmail image, and allowing the `make` process to proceed. Tux Paint will simply open the SVG and generate a thumbnail to display on the screen when the "New" dialog is brought up.
This commit is contained in:
parent
d3212c6632
commit
9781a4723c
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -720,7 +720,7 @@ $(THUMB_STARTERS):
|
||||||
convert $(CONVERT_OPTS) obj/tmp_$(notdir $(STARTER_NAME)).png $@ ; \
|
convert $(CONVERT_OPTS) obj/tmp_$(notdir $(STARTER_NAME)).png $@ ; \
|
||||||
rm obj/tmp_$(notdir $(STARTER_NAME)).png ; \
|
rm obj/tmp_$(notdir $(STARTER_NAME)).png ; \
|
||||||
else \
|
else \
|
||||||
convert $(CONVERT_OPTS) $(STARTER_NAME) $@ ; \
|
convert $(CONVERT_OPTS) $(STARTER_NAME) $@ || ( echo "IT FAILED" ; rm -v $@ ) ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(INSTALLED_THUMB_STARTERS): $(DATA_PREFIX)/%: %
|
$(INSTALLED_THUMB_STARTERS): $(DATA_PREFIX)/%: %
|
||||||
|
|
@ -775,7 +775,7 @@ TEMPLATE_NAME=$(or $(wildcard $(subst templates/.thumbs,templates,$(@:-t.png=.sv
|
||||||
$(THUMB_TEMPLATES):
|
$(THUMB_TEMPLATES):
|
||||||
@echo -n "."
|
@echo -n "."
|
||||||
@mkdir -p templates/.thumbs
|
@mkdir -p templates/.thumbs
|
||||||
@convert $(CONVERT_OPTS) $(TEMPLATE_NAME) $@ ; \
|
convert $(CONVERT_OPTS) $(TEMPLATE_NAME) $@ || ( echo "IT FAILED" ; rm -v $@ ) ; \
|
||||||
|
|
||||||
$(INSTALLED_THUMB_TEMPLATES): $(DATA_PREFIX)/%: %
|
$(INSTALLED_THUMB_TEMPLATES): $(DATA_PREFIX)/%: %
|
||||||
@install -D -m 644 $< $@
|
@install -D -m 644 $< $@
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue