Card - improve error message when reading invalid svg files

Add a test file in samples/images - it's a simple 1x1 pixel white png
saved with a 'svg' extension.

Fix for #228

(cherry picked from commit 32fad2460753a72cc2b0100d0a132512b6eeed81)

# Conflicts:
#	lib/squib/graphics/image.rb
This commit is contained in:
Dave Schaefer
2017-10-05 10:33:00 -04:00
committed by Andy Meneely
parent 4e92b1ae31
commit 52920ab8f0
3 changed files with 9 additions and 1 deletions
+3
View File
@@ -95,5 +95,8 @@ Squib::Deck.new(width: 825, height: 1125, cards: 1, config: 'load_images_config.
svg file: 'spanner.svg', width: :deck, height: :deck,
force_id: true, id: '' # <-- the important part
# Squib can handle incorrectly formatted svg files
svg file: 'bad-svg.svg'
save prefix: 'load_images_', format: :png
end
Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B