data structure of pixel in Gimp-perl

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

 



Hi, there,
  I am using Gimp-Perl v1.083 to manipulate the pixel data of an image.
What I am confusing about is the data structure of the packed pixel
data. For example, I can run the following perl code:
    

    $region = $drawable->get->pixel_rgn (0,0, 100,100, 1,0);
    $pixel = $region->get_pixel (5,7);     # fetches the pixel from
(5|7)
    print $pixel;                          # outputs something like
                                           # [255, 127, 0], i.e. in
                                           # RGB format ;)

But how can I modify the components of this $pixel? For example, modify
it to [255,127,1]?
  I have tried to treat it as an array or an array reference, but I
failed. Any help is greatly appreciated.
Xiaodi




[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux