"gimp-pattern-get-pixels" and "gimp-brush-get-pixels" crash with big patterns/brushes
Submitted by Gino D
Link to original bug (#652118)
Description
The procedure called "gimp-pattern-get-pixels" causes the Script-Fu interpreter to crash if the array representing the pixel data of the specified pattern (which should normally be returned as fifth output value) exceeds a length of 50000 elements. Same problem with "gimp-brush-get-pixels", when the pixel data array of the specified brush has more than 50000 elements.
As for the pattern based procedure, the bug can be reproduced like this:
-
create a new image with the following options, so as to exactly get a layer fitted with 50000 pixels and 1 bit per pixel: Width: 250 px Height: 200 px Color space: Grayscale Fill with: White
-
select 'Edit -> Copy';
-
open the Script-Fu console;
-
execute this command: (gimp-pattern-get-pixels "Clipboard")
It is also easy to verify that, from among the pre-installed GIMP patterns, "Crack" and "Stone" are affected by this kind of problem.
Version: git master