Re: Using Imager module to resample images



On 29 Jan 2008 14:45:42 GMT, Abigail <abigail@xxxxxxxxxx> wrote:

_
zentara (zentara@xxxxxxxxxxxxxx) wrote on VCCLXIV September MCMXCIII in
<URL:news:vv6up3521ho9pu3io1l4qvsk0nag72mgvg@xxxxxxx>:
@@ On Tue, 29 Jan 2008 03:08:11 -0800 (PST), Jason Carlton
@@ <jwcarlton@xxxxxxxxx> wrote:
@@
@@ >2. How do I recognize an animated GIF from a static GIF?
@@
@@ I believe it's safe to assume a static gif begins with GIF87, and
@@ an animated with GIF89. But I'm not sure it's an absolute.

While it is true that a GIF87a image is static, and that any animated
gif image is a GIF89a one, it does not mean that GIF89a forbids static
images. GIF89a is an enhancement of GIF87a. It allows animated images,
but it also allows interlaced images and other features. It doesn't
mandate one.

Abigail

Yeah, it's not an absolute..... but the gif isn't 89a, then it won't
animate. So if it says 87a you can be sure it's a single image.
If it's 89a, then you test for multiple files

################################################
from perldoc Imager::Files:

read_multi
If you're reading from a format that supports multiple images per
file, use the "read_multi()" method:

my @imgs = Imager->read_multi(file=>$filename, type=>$type)
or die "Cannot read $filename: ", Imager->errstr;

As with the read() method, Imager will normally detect the "type"
automatically.
#################################################

So it seems like you can attempt to open the 89a with read_multi(),
and if you get an errstr, open it as a single file.

I havn't poured over every Imager perldoc, but there is a section on
GUESSSING TYPES in Imager::Files.


zentara


--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
.



Relevant Pages

  • Re: Export or copy animated gifs
    ... Using picture export retains the full GIF file. ... How are you determining that you are exporting still images? ... Does the GIF animate? ...
    (microsoft.public.powerpoint)
  • Re: Can I compress GIF files the same way I do JPG files ?
    ... Can I compress GIF files the same way I do JPG files? ... It can combine a series of images into a single multipage ps, pdf, tiff, ... These days a lot of scanners have the ...
    (comp.unix.sco.misc)
  • Re: New at this game and iMac and a ??
    ... >> Entourage will not animate embedded gifs in simple HTML (or as attachments ... It will, however, animate gifs in complex HTML ... >, an embedded animated GIF file, and an embedded Midi file. ...
    (microsoft.public.mac.office.entourage)
  • Re: GIF does not animate in PowerPoint 2003
    ... Geetesh Bajaj, Microsoft PowerPoint MVP ... I downloaded a shareware GIF> editor, ... >>2003 does not loop (animate) an animated GIF unless the> loop option is ... >>Geetesh Bajaj, Microsoft PowerPoint MVP ...
    (microsoft.public.powerpoint)
  • Re: Problem with Animation
    ... > Steve - thanks for your reply - I would love for the inserted picture which> is a 1MB gif animation to NOT be linked but rather be embedded - all I do is ... > insert it like I would any other picture - But, MS docs seem to say that> animated gif's have to be linked? ... but animated GIFs are a different animal as far as PPT is concerned. ... Do the people at the other end see the GIF, but don't get it to animate? ...
    (microsoft.public.powerpoint)