+ {
+ # testing writing the loop extension
+ my $im1 = Imager->new(xsize => 100, ysize => 100);
+ $im1->box(filled => 1, color => '#FF0000');
+ my $im2 = Imager->new(xsize => 100, ysize => 100);
+ $im2->box(filled => 1, color => '#00FF00');
+ ok(Imager->write_multi({
+ gif_loop => 5,
+ gif_delay => 50,
+ file => 'testout/t105loop.gif'
+ }, $im1, $im2),
+ "write with loop extension");
+
+ my @im = Imager->read_multi(file => 'testout/t105loop.gif');
+ is(@im, 2, "read loop images back");
+ is($im[0]->tags(name => 'gif_loop'), 5, "first loop read back");
+ is($im[1]->tags(name => 'gif_loop'), 5, "second loop read back");
+ is($im[0]->tags(name => 'gif_delay'), 50, "first delay read back");
+ is($im[1]->tags(name => 'gif_delay'), 50, "second delay read back");
+ }