gifsicle breaks the gifs. -_-
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabian Schlenz 2019-09-04 12:48:45 +02:00
parent 5bd831cedc
commit 549bce479a
23 changed files with 7 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -15,6 +15,7 @@ for effect in $EFFECTS; do
echo " + ./recorder.rb $IP /tmp/effect.gif $effect"
./recorder.rb $IP /tmp/effect.gif $effect
echo
echo " + gifsicle /tmp/effect.gif -o effects/$effect.gif"
gifsicle /tmp/effect.gif -o effects/$effect.gif
#echo " + gifsicle /tmp/effect.gif -o ../../docs/effects/$effect.gif"
#gifsicle /tmp/effect.gif -o ../../docs/effects/$effect.gif
mv /tmp/effect.gif ../../docs/effects/$effect.gif
done

View File

@ -9,7 +9,7 @@ IP = ARGV[0]
PORT = 2122
FILE = ARGV[1] or raise "No filename given"
EFFECT = ARGV[2]
FRAMES = 250
FRAMES = 125
FACTOR = 1
delay = 50
@ -53,20 +53,13 @@ while gif.length < FRAMES do
id = data.shift << 8 | data.shift
if last_id != id-1 && last_id != id-2
puts
puts "Skipped from #{last_id} to #{id}."
gif = ImageList.new
end
last_id = id
if img && last_frame_time
last_diff = diff = Time.now.to_f * 100 - last_frame_time.to_f * 100
img.delay = diff
end
last_frame_time = Time.now
img = Image.new(dim_x, dim_y)
img.delay = 5
img.delay = 1
gc = Draw.new
#next
@ -84,10 +77,10 @@ while gif.length < FRAMES do
img.sample!(FACTOR)
gif << img
end
img.delay = last_diff
s.close
puts
puts "Generating gif..."
gif.ticks_per_second = 100
gif.write(FILE)
puts
puts