2 hours ago
Hi rgbellotti,
You've found an alternative method but just to follow up your first method in your first post:
The number of channels you specified didn't match the layer you created.
You specified 4 channels:
(gimp-drawable-set-pixel drawframe x y 4 new-pixel)
which is rgba.
For 2.10 gimp-layer-new the layer type is
{ RGB-IMAGE (0), RGBA-IMAGE (1), GRAY-IMAGE (2), GRAYA-IMAGE (3), INDEXED-IMAGE (4), INDEXEDA-IMAGE (5) }
Whereas you put RGB which is 0, so no alpha:
(drawframe (car (gimp-layer-new frame 10 10 RGB "Test Layer" 100 NORMAL-MODE)))
RGB is typically used for image type:
{ RGB (0), GRAY (1), INDEXED (2) }
In your second post it was fixed when you hardcoded 1 for type:
(drawframe (car (gimp-layer-new frame 10 10 1 "Test Layer" 100 28)))
Perhaps intead of hardcoding the number of channels you could have used:
(gimp-drawable-bpp drawable)
to get the bytes per pixel.
You've found an alternative method but just to follow up your first method in your first post:
The number of channels you specified didn't match the layer you created.
You specified 4 channels:
(gimp-drawable-set-pixel drawframe x y 4 new-pixel)
which is rgba.
For 2.10 gimp-layer-new the layer type is
{ RGB-IMAGE (0), RGBA-IMAGE (1), GRAY-IMAGE (2), GRAYA-IMAGE (3), INDEXED-IMAGE (4), INDEXEDA-IMAGE (5) }
Whereas you put RGB which is 0, so no alpha:
(drawframe (car (gimp-layer-new frame 10 10 RGB "Test Layer" 100 NORMAL-MODE)))
RGB is typically used for image type:
{ RGB (0), GRAY (1), INDEXED (2) }
In your second post it was fixed when you hardcoded 1 for type:
(drawframe (car (gimp-layer-new frame 10 10 1 "Test Layer" 100 28)))
Perhaps intead of hardcoding the number of channels you could have used:
(gimp-drawable-bpp drawable)
to get the bytes per pixel.