It is currently Wed Jul 24, 2024 4:29 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Pattern coming out greyscale
PostPosted: Mon Jun 30, 2014 4:03 am  (#1) 
Offline
New Member

Joined: Jun 30, 2014
Posts: 1
Hi, I'm new to scripting. I am trying to fill a pattern onto a new image, it seems to work ok except it always comes out as greyscale. Would anyone know why this is?

Thanks

(define (set-pattern-make text-pattern outfile)
(gimp-patterns-refresh)
(gimp-context-set-pattern text-pattern)
(define width 3600)
(define height 3600)
(define image (car (gimp-image-new width height RGB)))
(gimp-image-set-resolution image 300 300)
(gimp-drawable-fill image PATTERN-FILL)
(gimp-file-save RUN-NONINTERACTIVE image TRUE outfile outfile)
(gimp-image-delete image)
(gimp-quit TRUE))


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Pattern coming out greyscale
PostPosted: Mon Jun 30, 2014 4:37 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
Did you try going to Image > Mode > RGB ?

_________________
Image


Top
 Post subject: Re: Pattern coming out greyscale
PostPosted: Mon Jun 30, 2014 5:14 am  (#3) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
I'm slightly surprised it does that much.

From the procedure browser entry for gimp-image-new:
Quote:
Creates a new image, undisplayed with the specified extents and type. A layer should be created and added before this image is displayed, or subsequent calls to 'gimp-display-new' with this image as an argument will fail. Layers can be created using the 'gimp-layer-new' commands. They can be added to an image using the 'gimp-image-add-layer' command.


Then for gimp-drawable-fill: According to the procedure browser it takes a drawable as it's first parameter, but you are passing the image id, so you would need to have added a new drawable (layer) to fill?

Kevin


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) 'Equalize' and 'White Balance' makes image greyscale

3

No new posts Attachment(s) Colorful Pattern from Text (Text Pattern) Plug-in

32

No new posts Attachment(s) Pattern Editor

1

No new posts Attachment(s) Seamless Pattern - Help please

3

No new posts Attachment(s) Photoshop pattern

6



* Login  



Powered by phpBB3 © phpBB Group