As it isn't obvious, the cols and rows arguments correspond to the width and height of the new image, expressed in pixels. Example #1 would generate a 100 pixel by 100 pixel image.
As it isn't obvious, the cols and rows arguments correspond to the width and height of the new image, expressed in pixels. Example #1 would generate a 100 pixel by 100 pixel image.