Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 71494
Status: new
Priority: 80/
Queue: Imager

Owner: Nobody in particular
Requestors: TONYC [...]

Bug Information
Severity: Wishlist
Broken in: 0.85
Fixed in: (no value)

Subject: provide image file iteration for files with multiple images
Date: Thu, 6 Oct 2011 16:42:27 +1100
To: bug-Imager [...]
From: tonyc [...]
Download (untitled) / with headers
text/plain 743b
Currently all of the images in a multi-image GIF, TIFF or PNM file are loaded into memory when reading or writing: my @images = Imager->read_multi(...); Imager->write_multi({ ... }, @images); Allow the caller to iterate over the images in a file. This must not use a callback mechanism: Imager->read_multi(onread => sub { my $img = shift; } ...) since that makes doing different things with different images from the file more complex. Ideally an iterator pattern: my $iter = Imager->read_iterator(file => ...); while (my $img = $iter->next) { } and similarly for writing: my $iter = Imager->write_iterator(file => ...); while (my $row = $sth->fetchrow) { my $img = ...; $iter->write($img) or die; }

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to