The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
ChangeLog 347
ChangeLog.xml 074
MANIFEST 04
META.json 44
META.yml 1010
Makefile.PL 99
README 353
README.textile 240
lib/Image/Size.pm 28100
t/1.sm.webp --
t/all.t 115
t/move.cur --
t/old-os2.bmp --
t/tux.ico --
14 files changed (This is a version diff) 60356
@@ -5,6 +5,50 @@
 		in a wide variety of common (and not-so-common) 
 		formats.                                        
 
+3.300	Saturday February 28, 2015, 08:44:22 AM -0800
+
+	* lib/Image/Size.pm
+	* t/all.t
+	* t/old-os2.bmp (added)
+	Add support for old OS/2 version of BMP header (Geoff Richards).
+
+	* lib/Image/Size.pm
+	Typo fixes (David Steinbrunner).                                
+
+	* lib/Image/Size.pm
+	Avoid a sprintf() warning in Perl 5.21. Perl 5.21 introduces a  
+	warning for redundant arguments to s?printf(), so sprintf("%d", 
+	1, 2) would warn. This commit silences that warning by passing  
+	sprintf the exact number of arguments that it expects (Brian    
+	Fraser).                                                        
+
+	* lib/Image/Size.pm
+	Added =encoding utf8 to pod - the accented character was        
+	causing a pod error (Neil Bowers).                              
+
+	* lib/Image/Size.pm
+	Added Z<> to the =item [012] to resolve pod warning. You can't  
+	have =item 0, so the way round this seems to be to add a Z<>    
+	(zero width space) before each digit (Neil Bowers).             
+
+	* lib/Image/Size.pm
+	Added link to github repo to doc (Neil Bowers).                 
+
+	* lib/Image/Size.pm
+	RT #41238: Applied modified version of patch from user to fix a 
+	die problem with unpack on truncated files.                     
+
+	* lib/Image/Size.pm
+	* t/1.sm.webp (added)
+	* t/all.t
+	* t/move.cur (added)
+	* t/tux.ico (added)
+	Add support for WEBP, ICO and CUR file types (Baldur            
+	Kristinsson).                                                   
+
+	* lib/Image/Size.pm
+	Fix some perlcritic issues.                                     
+
 3.232	Monday May 28, 2012, 05:20:00 PM -0700
 
 	* lib/Image/Size.pm
@@ -575,9 +619,9 @@
 	* t/all.t (added)
 	Initial commit of the core project files.                       
 
-# Generated on Monday May 28, 2012, 05:23:22 PM -0700
-# Using changelog2x/0.11, App::Changelog2x/0.11, XML::LibXML/1.96,             
-# XML::LibXSLT/1.77, libxml/2.7.3, libxslt/1.1.24 (with exslt)                 
+# Generated on Saturday February 28, 2015, 09:00:55 AM -0800
+# Using changelog2x/0.11, App::Changelog2x/0.11, XML::LibXML/2.0117,           
+# XML::LibXSLT/1.92, libxml/2.9.0, libxslt/1.1.28 (with exslt)                 
 # XSLT sources:
 #     $Id: changelog2text.xslt 8 2009-01-19 06:46:50Z rjray $
 #     $Id: common-text.xslt 8 2009-01-19 06:46:50Z rjray $
@@ -13,6 +13,80 @@
     information from files in a wide variety of common (and not-so-common)
     formats.
   </description>
+  <release version="3.300" sc:tag="3.300" date="2015-02-28T08:44:22-08:00">
+    <change git:commit="f538442f7b6a0547142337be988c96b8d37648c0">
+      <fileset>
+        <file path="lib/Image/Size.pm" />
+        <file path="t/all.t" />
+        <file path="t/old-os2.bmp" action="ADD" />
+      </fileset>
+      <description>
+        Add support for old OS/2 version of BMP header (Geoff Richards).
+      </description>
+    </change>
+    <change git:commit="d5a47fa98f5008a419de60a826883cdfa1bad4f8">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        Typo fixes (David Steinbrunner).
+      </description>
+    </change>
+    <change git:commit="28fb705be3730342cb65fe5e1fde252fa4424ca6">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        Avoid a sprintf() warning in Perl 5.21. Perl 5.21 introduces a warning
+        for redundant arguments to s?printf(), so sprintf("%d", 1, 2) would
+        warn. This commit silences that warning by passing sprintf the
+        exact number of arguments that it expects (Brian Fraser).
+      </description>
+    </change>
+    <change git:commit="64e39193169d32f4a2d366f11d1eb97a9695fc9d">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        Added =encoding utf8 to pod - the accented character was causing a pod
+        error (Neil Bowers).
+      </description>
+    </change>
+    <change git:commit="d8e79be2f5a5844c63829ff4598047e71eb40cf5">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        Added Z&lt;&gt; to the =item [012] to resolve pod warning.
+        You can't have =item 0, so the way round this seems to be to add a
+        Z&lt;&gt; (zero width space) before each digit (Neil Bowers).
+      </description>
+    </change>
+    <change git:commit="5f7f014873171be7c0bb3f942d25587c2e312a47">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        Added link to github repo to doc (Neil Bowers).
+      </description>
+    </change>
+    <change git:commit="ecf88247cbb9122e1cd290e559031dc911bad09f">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        <xhtml:a href="http://rt.cpan.org/Ticket/Display.html?id=41238">RT #41238</xhtml:a>:
+        Applied modified version of patch from user to fix a die problem with
+        unpack on truncated files.
+      </description>
+    </change>
+    <change git:commit="7f3de1e5f29d84d45a8ad98a76b7cbbe9112667c">
+      <fileset>
+        <file path="lib/Image/Size.pm" />
+        <file path="t/1.sm.webp" action="ADD" />
+        <file path="t/all.t" />
+        <file path="t/move.cur" action="ADD" />
+        <file path="t/tux.ico" action="ADD" />
+      </fileset>
+      <description>
+        Add support for WEBP, ICO and CUR file types (Baldur Kristinsson).
+      </description>
+    </change>
+    <change git:commit="cd5a4a70d4a8ca500bf31fd7aa6ae504eba70891">
+      <file path="lib/Image/Size.pm" />
+      <description>
+        Fix some perlcritic issues.
+      </description>
+    </change>
+  </release>
   <release version="3.232" sc:tag="3.232" date="2012-05-28T17:20:00-07:00">
     <change git:commit="330406f70b677b6ed71309d49c381b61738328b0">
       <file path="lib/Image/Size.pm" />
@@ -8,6 +8,7 @@ MANIFEST			This list of files
 MANIFEST.SKIP
 README
 README.textile
+t/1.sm.webp
 t/468x60.psd
 t/8.swf
 t/all.t
@@ -17,11 +18,14 @@ t/letter_N.ppm
 t/letter_T.jpg
 t/lexjdic.tif
 t/magick.t
+t/move.cur
+t/old-os2.bmp
 t/pak38.jpg
 t/pass-1_s.png
 t/spacer50.xbm
 t/test.gif
 t/Test_emf_small.emf
+t/tux.ico
 t/xterm.bmp
 t/xterm.xpm
 t/yasp.swf
@@ -4,7 +4,7 @@
       "Randy J. Ray <rjray@blackperl.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "Module::Build version 0.421",
    "license" : [
       "perl_5"
    ],
@@ -22,7 +22,7 @@
       },
       "configure" : {
          "requires" : {
-            "Module::Build" : "0.4"
+            "Module::Build" : "0.42"
          }
       },
       "runtime" : {
@@ -38,7 +38,7 @@
    "provides" : {
       "Image::Size" : {
          "file" : "lib/Image/Size.pm",
-         "version" : "3.232"
+         "version" : "3.300"
       }
    },
    "release_status" : "stable",
@@ -54,5 +54,5 @@
          "url" : "http://github.com/rjray/image-size"
       }
    },
-   "version" : "3.232"
+   "version" : "3.300"
 }
@@ -3,29 +3,29 @@ abstract: 'A library to extract height/width from images'
 author:
   - 'Randy J. Ray <rjray@blackperl.com>'
 build_requires:
-  Module::Build: 0.28
-  Test::More: 0.80
+  Module::Build: '0.28'
+  Test::More: '0.80'
 configure_requires:
-  Module::Build: 0.4
+  Module::Build: '0.42'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Module::Build version 0.421, CPAN::Meta::Converter version 2.143240'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Image-Size
 provides:
   Image::Size:
     file: lib/Image/Size.pm
-    version: 3.232
+    version: '3.300'
 recommends:
-  Compress::Zlib: 2
+  Compress::Zlib: '2'
 requires:
-  File::Spec: 0.8
-  perl: 5.006001
+  File::Spec: '0.8'
+  perl: '5.006001'
 resources:
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Image-Size
   homepage: http://search.cpan.org/dist/Image-Size
   license: http://dev.perl.org/licenses/
   repository: http://github.com/rjray/image-size
-version: 3.232
+version: '3.300'
@@ -1,19 +1,19 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.40
+# Note: this file was auto-generated by Module::Build::Compat version 0.4210
 require 5.006001;
 use ExtUtils::MakeMaker;
 WriteMakefile
 (
-  'PL_FILES' => {},
-  'INSTALLDIRS' => 'site',
   'NAME' => 'Image::Size',
-  'EXE_FILES' => [
-                   'imgsize'
-                 ],
   'VERSION_FROM' => 'lib/Image/Size.pm',
   'PREREQ_PM' => {
-                   'Test::More' => '0.80',
                    'File::Spec' => '0.8',
-                   'Module::Build' => '0.28'
-                 }
+                   'Module::Build' => '0.28',
+                   'Test::More' => '0.80'
+                 },
+  'INSTALLDIRS' => 'site',
+  'EXE_FILES' => [
+                   'imgsize'
+                 ],
+  'PL_FILES' => {}
 )
 ;
@@ -1,7 +1,7 @@
 Image::Size - Determine the size of images in several common formats
 ====================================================================
 
-Version: 3.232 (See CHANGES below)
+Version: 3.300 (See CHANGES below)
 
 
 WHAT IS IT
@@ -80,5 +80,55 @@ CHANGES
 
   * lib/Image/Size.pm
 
-Removed the "!" flag in pack template for EMF. It was not needed and it broke on
-earlier Perls.
+  * t/all.t
+
+  * t/old-os2.bmp (added)
+
+Add support for old OS/2 version of BMP header (Geoff Richards).
+
+  * lib/Image/Size.pm
+
+Typo fixes (David Steinbrunner).
+
+  * lib/Image/Size.pm
+
+Avoid a sprintf() warning in Perl 5.21. Perl 5.21 introduces a warning for
+redundant arguments to s?printf(), so sprintf("%d", 1, 2) would warn. This
+commit silences that warning by passing sprintf the exact number of arguments
+that it expects (Brian Fraser).
+
+  * lib/Image/Size.pm
+
+Added =encoding utf8 to pod - the accented character was causing a pod error
+(Neil Bowers).
+
+  * lib/Image/Size.pm
+
+Added Z<> to the =item [012] to resolve pod warning. You can't have =item 0, so
+the way round this seems to be to add a Z<> (zero width space) before each digit
+(Neil Bowers).
+
+  * lib/Image/Size.pm
+
+Added link to github repo to doc (Neil Bowers).
+
+  * lib/Image/Size.pm
+
+RT #41238: Applied modified version of patch from user to fix a die problem with
+unpack on truncated files.
+
+  * lib/Image/Size.pm
+
+  * t/1.sm.webp (added)
+
+  * t/all.t
+
+  * t/move.cur (added)
+
+  * t/tux.ico (added)
+
+Add support for WEBP, ICO and CUR file types (Baldur Kristinsson).
+
+  * lib/Image/Size.pm
+
+Fix some perlcritic issues.
@@ -1,6 +1,6 @@
 h1. Image::Size - Determine the size of images in several common formats
 
-Version: 3.232 (See CHANGES below)
+Version: 3.300 (See CHANGES below)
 
 h2. WHAT IS IT
 
@@ -70,5 +70,43 @@ Please send any reports of problems or bugs to rjray@blackperl.com.
 h2. CHANGES
 
 * lib/Image/Size.pm
+* t/all.t
+* t/old-os2.bmp (added)
 
-p{margin-bottom:2em}. Removed the "!" flag in pack template for EMF. It was not needed and it broke on earlier Perls.
+p{margin-bottom:2em}. Add support for old OS/2 version of BMP header (Geoff Richards).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. Typo fixes (David Steinbrunner).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. Avoid a sprintf() warning in Perl 5.21. Perl 5.21 introduces a warning for redundant arguments to s?printf(), so sprintf("%d", 1, 2) would warn. This commit silences that warning by passing sprintf the exact number of arguments that it expects (Brian Fraser).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. Added =encoding utf8 to pod - the accented character was causing a pod error (Neil Bowers).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. Added Z<> to the =item [012] to resolve pod warning. You can't have =item 0, so the way round this seems to be to add a Z<> (zero width space) before each digit (Neil Bowers).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. Added link to github repo to doc (Neil Bowers).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. RT #41238: Applied modified version of patch from user to fix a die problem with unpack on truncated files.
+
+* lib/Image/Size.pm
+* t/1.sm.webp (added)
+* t/all.t
+* t/move.cur (added)
+* t/tux.ico (added)
+
+p{margin-bottom:2em}. Add support for WEBP, ICO and CUR file types (Baldur Kristinsson).
+
+* lib/Image/Size.pm
+
+p{margin-bottom:2em}. Fix some perlcritic issues.
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# This file copyright (c) 2012 by Randy J. Ray, all rights reserved
+# This file copyright (c) 2015 by Randy J. Ray, all rights reserved
 #
 # Copying and distribution are permitted under the terms of the Artistic
 # License 2.0 (http://www.opensource.org/licenses/artistic-license-2.0.php) or
@@ -23,27 +23,25 @@ require 5.006001;
 # These are the Perl::Critic policies that are being turned off globally:
 ## no critic(RequireBriefOpen)
 ## no critic(ProhibitAutomaticExportation)
-## no critic(ProhibitExplicitISA)
 
 use strict;
 use warnings;
 use bytes;
 use vars qw(
-    @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION $NO_CACHE %CACHE
+    @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION $NO_CACHE %CACHE
     $GIF_BEHAVIOR @TYPE_MAP %PCD_MAP $PCD_SCALE $READ_IN $LAST_POS
 );
 
-use Exporter;
+use Exporter 'import';
 
 BEGIN
 {
-    @ISA         = qw(Exporter);
     @EXPORT      = qw(imgsize);
     @EXPORT_OK   = qw(imgsize html_imgsize attr_imgsize
                       %CACHE $NO_CACHE $PCD_SCALE $GIF_BEHAVIOR);
     %EXPORT_TAGS = ('all' => [ @EXPORT_OK ]);
 
-    $VERSION = '3.232';
+    $VERSION = '3.300';
     $VERSION = eval $VERSION; ## no critic(ProhibitStringyEval)
 
     # Default behavior for GIFs is to return the "screen" size
@@ -72,6 +70,9 @@ $NO_CACHE = 0;
     qr{^CWS}                     => \&swfmxsize,
     qr{^\x8aMNG\x0d\x0a\x1a\x0a} => \&mngsize,
     qr{^\x01\x00\x00\x00}        => \&emfsize,
+    qr{^RIFF(?s:....)WEBP}       => \&webpsize,
+    qr{^\x00\x00\x01\x00}        => \&icosize,
+    qr{^\x00\x00\x02\x00}        => \&cursize,
 );
 # Kodak photo-CDs are weird. Don't ask me why, you really don't want details.
 %PCD_MAP = ( 'base/16' => [ 192,  128  ],
@@ -131,7 +132,7 @@ sub imgsize ## no critic(ProhibitExcessComplexity)
 
     my ($handle, $header);
     my ($x, $y, $id, $mtime, @list);
-    # These only used if $stream is an existant open FH
+    # These only used if $stream is an existing open FH
     my ($save_pos, $need_restore) = (0, 0);
     # This is for when $stream is a locally-opened file
     my $need_close = 0;
@@ -156,7 +157,7 @@ sub imgsize ## no critic(ProhibitExcessComplexity)
         $save_pos = tell $handle;
         $need_restore = 1;
 
-        # First alteration (didn't wait long, did I?) to the existant handle:
+        # First alteration (didn't wait long, did I?) to the existing handle:
         #
         # assist dain-bramaged operating systems -- SWD
         # SWD: I'm a bit uncomfortable with changing the mode on a file
@@ -234,7 +235,7 @@ sub imgsize ## no critic(ProhibitExcessComplexity)
         $CACHE{$stream} = join q{,}, $mtime, $x, $y, $id;
     }
 
-    # If we were passed an existant file handle, we need to restore the
+    # If we were passed an existing file handle, we need to restore the
     # old filepos:
     if ($need_restore)
     {
@@ -325,7 +326,7 @@ sub html_imgsize
 
     # Use lowercase and quotes so that it works with xhtml.
     return ((defined $args[0]) ?
-            sprintf('width="%d" height="%d"', @args) :
+            sprintf('width="%d" height="%d"', @args[0,1]) :
             undef);
 }
 
@@ -365,13 +366,10 @@ sub _bin2int
 ###########################################################################
 # Subroutine gets the size of the specified GIF
 ###########################################################################
-sub gifsize
+sub gifsize ## no critic(ProhibitExcessComplexity)
 {
     my $stream = shift;
 
-    # We use bitwise-and here:
-    ## no critic(ProhibitBitwiseOperators)
-
     my ($cmapsize, $buf, $sh, $sw, $x, $y, $type);
 
     my $gif_blockskip = sub {
@@ -641,7 +639,11 @@ sub jpegsize
         elsif ((ord($code) >= $SIZE_FIRST) && (ord($code) <= $SIZE_LAST))
         {
             # Segments that contain size info
-            ($y, $x) = unpack 'xnn', $READ_IN->($stream, 5);
+            $length = 5;
+            my $buf = $READ_IN->($stream, $length);
+            # unpack dies on truncated data
+            last if (length($buf) < $length);
+            ($y, $x) = unpack 'xnn', $buf;
             $id = 'JPG';
             last;
         }
@@ -792,7 +794,15 @@ sub bmpsize
     my $buffer;
 
     $buffer = $READ_IN->($stream, 26);
-    ($x, $y) = unpack 'x18VV', $buffer;
+    my $header_size = unpack 'x14V', $buffer;
+    if ($header_size == 12)
+    {
+        ($x, $y) = unpack 'x18vv', $buffer;     # old OS/2 header
+    }
+    else
+    {
+        ($x, $y) = unpack 'x18VV', $buffer;     # modern Windows header
+    }
     if (defined $x and defined $y)
     {
         $id = 'BMP';
@@ -842,9 +852,6 @@ sub pcdsize
 {
     my $stream = shift;
 
-    # We use bitwise-and here:
-    ## no critic(ProhibitBitwiseOperators)
-
     my ($x, $y, $id) = (undef, undef, 'Unable to determine size of PCD data');
     my $buffer = $READ_IN->($stream, 0xf00);
 
@@ -911,10 +918,65 @@ sub emfsize
     return ($x, $y, 'EMF');
 }
 
+# WEBP files, see https://developers.google.com/speed/webp/docs/riff_container
+# Added by Baldur Kristinsson, github.com/bk
+sub webpsize {
+    my $img = shift;
+
+    # There are 26 bytes of lead-in, before the width and height info:
+    # 1. WEBP container
+    #    - 'RIFF', 4 bytes
+    #    - filesize, 4 bytes
+    #    - 'WEBP', 4 bytes
+    # 2. VP8 frame
+    #    - 'VP8', 3 bytes
+    #    - frame meta, 8 bytes
+    #    - marker, 3 bytes
+    my $buf = $READ_IN->($img, 4, 26);
+    my ($raw_w, $raw_h) = unpack 'SS', $buf;
+    my $b14 = 2**14 - 1;
+
+    # The width and height values contain a 2-bit scaling factor,
+    # which is left-shifted by 14 bits. We ignore this, since it seems
+    # not to be relevant for our purposes. WEBP images in actual use
+    # all seem to have a scaling factor of 0, anyway. (The meaning
+    # of the scaling factor is as follows: 0=no upscale, 1=upscale by 5/4,
+    # 2=upscale by 5/3, 3=upscale by 2).
+    #
+    # my $wscale = $raw_w >> 14;
+    # my $hscale = $raw_h >> 14;
+    my $x = $raw_w & $b14;
+    my $y = $raw_h & $b14;
+
+    return ($x, $y, 'WEBP');
+}
+
+# ICO files, originally contributed by Thomas Walloschke <thw@cpan.org>,
+# see https://rt.cpan.org/Public/Bug/Display.html?id=46279
+# (revised by Baldur Kristinsson, github.com/bk)
+sub icosize {
+    my $img = shift;
+    my ($x, $y) = unpack 'CC', $READ_IN->($img, 2, 6);
+    if ($x == 0) { $x = 256; }
+    if ($y == 0) { $y = 256; }
+    return ($x, $y, 'ICO');
+}
+
+# CUR files, originally contributed by Thomas Walloschke <thw@cpan.org>,
+# see https://rt.cpan.org/Public/Bug/Display.html?id=46279
+# (revised by Baldur Kristinsson, github.com/bk)
+sub cursize {
+    my ($x, $y, $ico) = icosize(shift);
+    return ($x, $y, 'CUR');
+}
+
+
 1;
 
 __END__
 
+=encoding utf8
+
 =head1 NAME
 
 Image::Size - read the dimensions of an image in several popular formats
@@ -1057,6 +1119,12 @@ Image::Size natively understands and sizes data in the following formats:
 
 =item EMF (Windows Enhanced Metafile Format)
 
+=item WEBP
+
+=item ICO (Microsoft icon format)
+
+=item CUR (Microsoft mouse cursor format)
+
 =back
 
 Additionally, if the B<Image::Magick> module is present, the file types
@@ -1075,7 +1143,7 @@ parameter reported by B<Image::Magick>, so it may not meet the 2-3 letter
 abbreviation format.  For example, a WBMP file might be reported as
 'Wireless Bitmap (level 0) image' in this case.
 
-=head2 Information Cacheing and C<$NO_CACHE>
+=head2 Information Caching and C<$NO_CACHE>
 
 When a filename is passed to any of the sizing routines, the default behavior
 of the library is to cache the resulting information. The modification-time of
@@ -1084,7 +1152,7 @@ updated. This was originally added due to the fact that a number of CGI
 applications were using this library to generate attributes for pages that
 often used the same graphical element many times over.
 
-However, the cacheing can lead to problems when the files are generated
+However, the caching can lead to problems when the files are generated
 dynamically, at a rate that exceeds the resolution of the modification-time
 value on the filesystem. Thus, the optionally-importable control variable
 C<$NO_CACHE> has been introduced. If this value is anything that evaluates to a
@@ -1158,7 +1226,7 @@ image file.
 =head2 Controlling Behavior with GIF Images
 
 GIF images present a sort of unusual situation when it comes to reading size.
-Because GIFs can be a series of sub-images to be isplayed as an animated
+Because GIFs can be a series of sub-images to be played as an animated
 sequence, what part does the user want to get the size for?
 
 When dealing with GIF files, the user may control the behavior by setting the
@@ -1168,7 +1236,7 @@ GIF-handling code:
 
 =over 4
 
-=item 0
+=item Z<>0
 
 This is the default value. When this value is chosen, the returned dimensions
 are those of the "screen". The "screen" is the display area that the GIF
@@ -1179,7 +1247,7 @@ cropped to fit within the box.
 This is also the fastest method for sizing the GIF, as it reads the least
 amount of data from the image stream.
 
-=item 1
+=item Z<>1
 
 If this value is set, then the size of the first sub-image within the GIF is
 returned. For plain (non-animated) GIF files, this would be the same as the
@@ -1188,7 +1256,7 @@ screen (though it doesn't have to be, strictly-speaking).
 When the first image descriptor block is read, the code immediately returns,
 making this only slightly-less efficient than the previous setting.
 
-=item 2
+=item Z<>2
 
 If this value is chosen, then the code loops through all the sub-images of the
 animated GIF, and returns the dimensions of the largest of them.
@@ -1297,7 +1365,7 @@ including any stages that would re-write the URL or otherwise modify it.
 =head1 DIAGNOSTICS
 
 The base routine, C<imgsize>, returns B<undef> as the first value in its list
-when an error has occured. The third element contains a descriptive
+when an error has occurred. The third element contains a descriptive
 error message.
 
 The other two routines simply return B<undef> in the case of error.
@@ -1308,7 +1376,7 @@ Caching of size data can only be done on inputs that are file names. Open
 file handles and scalar references cannot be reliably transformed into a
 unique key for the table of cache data. Buffers could be cached using the
 MD5 module, and perhaps in the future I will make that an option. I do not,
-however, wish to lengthen the dependancy list by another item at this time.
+however, wish to lengthen the dependency list by another item at this time.
 
 As B<Image::Magick> operates on file names, not handles, the use of it is
 restricted to cases where the input to C<imgsize> is provided as file name.
@@ -1342,7 +1410,7 @@ supplied the PSD (PhotoShop) code, a bug was identified by Alex Weslowski
 was adapted from a script made available by Phil Greenspun, as guided to my
 attention by Matt Mueller I<mueller@wetafx.co.nz>. A thorough read of the
 documentation and source by Philip Newton I<Philip.Newton@datenrevision.de>
-found several typos and a small buglet. Ville Skyttä I<(ville.skytta@iki.fi)>
+found several typos and a small buglet. Ville Skytt� I<(ville.skytta@iki.fi)>
 provided the MNG and the Image::Magick fallback code. Craig MacKenna
 I<(mackenna@animalhead.com)> suggested making the cache available so that it
 could be used with shared memory, and helped test my change before release.
@@ -1381,6 +1449,10 @@ L<http://github.com/rjray/image-size>
 
 =back
 
+=head1 REPOSITORY
+
+L<https://github.com/rjray/image-size>
+
 =head1 LICENSE AND COPYRIGHT
 
 This file and the code within are copyright (c) 1996-2009 by Randy J. Ray.
diff --git a/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/1.sm.webp b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/1.sm.webp
new file mode 100644
index 00000000..0da983e2
Binary files /dev/null and b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/1.sm.webp differ
@@ -2,7 +2,7 @@
 
 use IO::File;
 use Image::Size qw(:all);
-use Test::More tests => 19;
+use Test::More tests => 23;
 
 # We now only test the CWS branch if the user already has Compress::Zlib
 # available. We no longer require it for installation.
@@ -52,6 +52,8 @@ ok(($x == 35 && $y == 32 && $id eq 'TIF'), 'Basic TIFF format test (2)');
 # Test BMP code from Aldo Calpini
 ($x, $y, $id) = imgsize("${dir}xterm.bmp");
 ok(($x == 64 && $y == 38 && $id eq 'BMP'), 'Basic BMP format test');
+($x, $y, $id) = imgsize("${dir}old-os2.bmp");
+ok(($x == 1500 && $y == 1000 && $id eq 'BMP'), 'Basic BMP OS/2 format test');
 
 # Test SWF code from Dmitry Dorofeev <dima@yasp.com>
 ($x, $y, $id) = imgsize("${dir}yasp.swf");
@@ -61,6 +63,18 @@ ok(($x == 85 && $y == 36 && $id eq 'SWF'), 'Basic SWF format test');
 ($x, $y, $id) = imgsize("${dir}Test_emf_small.emf");
 ok(($x == 638 && $y == 949 && $id eq 'EMF'), 'Basic EMF format test');
 
+# Test WEBP code from Baldur Kristinsson
+($x, $y, $id) = imgsize("${dir}1.sm.webp");
+ok(($x == 320 && $y == 214 && $id eq 'WEBP'), 'Basic WEBP format test');
+
+# Test ICO code from Baldur Kristinsson
+($x, $y, $id) = imgsize("${dir}tux.ico");
+ok(($x == 16 && $y == 16 && $id eq 'ICO'), 'Basic ICO format test');
+
+# Test CUR code from Baldur Kristinsson
+($x, $y, $id) = imgsize("${dir}move.cur");
+ok(($x == 32 && $y == 32 && $id eq 'CUR'), 'Basic CUR format test');
+
 SKIP: {
     skip 'Compress::Zlib not installed', 1 unless $do_cws_test;
 
diff --git a/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/move.cur b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/move.cur
new file mode 100644
index 00000000..e793d271
Binary files /dev/null and b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/move.cur differ
diff --git a/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/old-os2.bmp b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/old-os2.bmp
new file mode 100644
index 00000000..9ae10f63
Binary files /dev/null and b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/old-os2.bmp differ
diff --git a/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/tux.ico b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/tux.ico
new file mode 100644
index 00000000..37b32fab
Binary files /dev/null and b/var/tmp/source/RJRAY/Image-Size-3.300/Image-Size-3.300/t/tux.ico differ