]> git.imager.perl.org - imager.git/commitdiff
[rt #89567] be a bit more obvious about raw channels
authorTony Cook <tony@develop-help.com>
Thu, 31 Oct 2013 04:35:33 +0000 (15:35 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 31 Oct 2013 04:35:33 +0000 (15:35 +1100)
lib/Imager/Files.pod

index a00a0d5130c8781e30fd71d1658886d824afdc19..91e79f2e097e10b35f2b1b79407244d1432c45d0 100644 (file)
@@ -1233,23 +1233,27 @@ image in the C<xsize> and C<ysize> options:
     or die "Cannot read raw image\n";
 
 If your input file has more channels than you want, or (as is common),
-junk in the fourth channel, you can use the C<datachannels> and
-C<storechannels> options to control the number of channels in your input
+junk in the fourth channel, you can use the C<raw_datachannels> and
+C<raw_storechannels> options to control the number of channels in your input
 file and the resulting channels in your image.  For example, if your
 input image uses 32-bits per pixel with red, green, blue and junk
 values for each pixel you could do:
 
-  $img->read(file=>'foo.raw', xsize=>100, ysize=>100, datachannels=>4,
-            storechannels=>3)
+  $img->read(file=>'foo.raw', xsize => 100, ysize => 100,
+             raw_datachannels => 4, raw_storechannels => 3,
+            raw_interleave => 0)
     or die "Cannot read raw image\n";
 
+In general, if you supply C<raw_storechannels> you should also supply
+C<raw_datachannels>
+
 Read parameters:
 
 =over
 
 =item *
 
-raw_interleave - controls the ordering of samples within the image.
+C<raw_interleave> - controls the ordering of samples within the image.
 Default: 1.  Alternatively and historically spelled C<interleave>.
 Possible values:
 
@@ -1286,13 +1290,13 @@ C<raw_interleave> parameter.
 
 =item *
 
-raw_storechannels - the number of channels to store in the image.
+C<raw_storechannels> - the number of channels to store in the image.
 Range: 1 to 4.  Default: 3.  Alternatively and historically spelled
 C<storechannels>.
 
 =item *
 
-raw_datachannels - the number of channels to read from the file.
+C<raw_datachannels> - the number of channels to read from the file.
 Range: 1 or more.  Default: 3.  Alternatively and historically spelled
 C<datachannels>.