[gimp-perl] Document Gimp::PixelRgn PDL dims.



commit 3c8218c4b3c6bdbbf08f280bb219141f30480e12
Author: Ed J <edj src gnome org>
Date:   Thu Jun 19 22:54:46 2014 +0100

    Document Gimp::PixelRgn PDL dims.

 Gimp/PixelRgn.pod |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/Gimp/PixelRgn.pod b/Gimp/PixelRgn.pod
index ed5e95e..ddbe60e 100644
--- a/Gimp/PixelRgn.pod
+++ b/Gimp/PixelRgn.pod
@@ -104,6 +104,16 @@ And the corresponding set-functions:
 Please note that (unlike the C functions they call), the size arguments
 (width and/or height) are omitted; they are calculated from the piddle.
 
+The dimensions of the piddle are, for a rectangle (due to how GIMP stores
+the data):
+
+  ($bytesperpixel, $width, $height) = $r->get_rect($l->bounds)->dims;
+
+For a row or column:
+
+  ($bytesperpixel, $width) = $r->get_row(0, 0, $width)->dims;
+  ($bytesperpixel, $height) = $r->get_col(0, 0, $height)->dims;
+
 =head1 EXAMPLES
 
 Functions demonstrating getting and setting the colour of a pixel on an


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]