It is currently Tue Apr 16, 2024 3:19 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 3:06 am  (#1) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
First of all, this is my very FIRST attempt to actually try to accommodate myself with an existing script, namely the recent charcoal.scm (which me and Rod asked for leaving the original layer and working on a copy at the Registry). I'm sort of glad the author showed indifference because I knew eventually it would push me into trying harder to do it myself. So I did. Took me several hours, but I figured it out.

This script now gives you the ability to leave the original layer (tick new layer toggle) and to max the original layer to the new image size (tick Max original layer toggle) should you tick the Resize for optimum effect toggle.

I've added Saulgoode's suggestion to the script and resubmitted the zipped file. It will no longer require the extend layer script to work.

The Max Original toggle calls up Saulgoode's sg-extend-layer.scm script, so grab that if you don't have it.

http://chiselapp.com/user/saulgoode/rep ... tend-layer


Attachments:
charcoal.scm.zip [2.45 KiB]
Downloaded 310 times

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Last edited by mahvin on Wed Feb 23, 2011 3:08 pm, edited 2 times in total.
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: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 3:45 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Lovely, thanks mahvin.

Image

I think if i were to select all the black in several dif layers i could color it nicely. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 9:01 am  (#3) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Do you maybe knows what the script does?
i may see the effect, i mean do you know how does that, which steps automatize ?

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 9:32 am  (#4) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I like having the original image preserved. Nice job, mahvin. :geek

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 10:07 am  (#5) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
great on the tiger !

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 1:03 pm  (#6) 
Offline
GimpChat Member

Joined: Feb 06, 2011
Posts: 342
I like this Mahvin. Thanks :)


Attachments:
charcoalHiefers 2005.png
charcoalHiefers 2005.png [ 217.04 KiB | Viewed 4919 times ]
Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 1:23 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
mahvin wrote:
The Max Original toggle calls up Saulgoode's sg-extend-layer.scm script, so grab that if you don't have it.

http://chiselapp.com/user/saulgoode/rep ... tend-layer

It appears that whenever your version of the charcoal script calls the Extend Layer script, there is no selection present. If this assessment is accurate, it would be quite easy for your script to rescale the layer by itself, without calling Extend Layer (if there is no selection when Extend Layer is called, the script merely scales the entire layer to match the image size).

    (when (= max-original TRUE)
      (gimp-layer-scale drawable
                        (car (gimp-image-width image))
                        (car (gimp-image-height image))
                        TRUE )
      (gimp-layer-set-offsets drawable 0 0) )

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 2:03 pm  (#8) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
Saulgoode:

Couldn't you then tell it to unselect the image before scaling? I mean, I looked at different ways to make it scale, but wasn't sure what was involved in the procedures. But I knew your script performed the task. So, if I wanted to remove all selections first, then perform the code you have above, would that need to include:

(gimp-selection-none image) - ?

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 2:19 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
mahvin wrote:
... So, if I wanted to remove all selections first, then perform the code you have above, would that need to include:

(gimp-selection-none image) - ?

I may have missed something, but from my cursory examination of the (charcoal) script, there doesn't seem to be a selection active* at the time you perform your scaling. Performing a 'gimp-selection-none' would not hurt anything, but I didn't think it necessary (and if it were necessary then I should feel compelled to re-examine my understanding of what is supposed to happen).


* The preceding operations entail a Select By Color, followed by copy and paste. When the paste occurs (creating a floated selection layer), there is no longer any selection present (even though the display may show marching ants around the original selection), and there is still no selection present after this floated layer is anchored.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Charcoal Script Reworked
PostPosted: Wed Feb 23, 2011 3:08 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
When I can, I will try it out! I like the results! If you keep your original color layer, you can experiment with blend modes and see what sweet images you get!

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 3:45 pm  (#11) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
Saulgoode:

I was just asking in the scope of how scripts work. The script already removes all selections at the beginning, and I followed the procedures to make sense of how it laid out before I called up your script. I guess I should have experimented with the various procedures before taking the lazy approach.

The procedure database isn't really all that explanatory in its usage and debugging bad syntax in the console isn't entirely helpful, either. If someone wrote a book on Scheme (GIMP script-fu) I'd buy it, even though I know it helps to look at existing scripts to make sense of what does what.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 4:20 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
I had to turn off the resizing, because I was getting some weird results. When I did this image, I merged all the non original layers and placed it above the original image. I set the blend mode to value. I really loved the effect. Then I took it one step further by selecting the darker part of the sky and filling it with white on a new transparent layer between the other two.

The original image is my own, by the way.


Attachments:
Gull_Charcoal_Lev_Sm.jpg
Gull_Charcoal_Lev_Sm.jpg [ 380.4 KiB | Viewed 1811 times ]

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.
Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 4:36 pm  (#13) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
PM: I've run this script in every possible imaginable way and it works out just fine in every instance. The only thing that I can possibly envision being a problem is the merging layers being commented out. I can't reproduce any "weird" effects, as you experience.

Even if I turn off resize for optimum effect and turn on Maximize original layer, still runs fine.

Which version are you using, btw?

I've run across a problem if NO toggles are true. The script then does NOTHING. Hmmm, default should be the charcoal script still runs. I'm not seeing that happen.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Last edited by mahvin on Wed Feb 23, 2011 4:43 pm, edited 1 time in total.

Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 4:38 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
It could be something flakey with the dinosaur computer I am trying it on.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 5:03 pm  (#15) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
PM: Ok. I want the script to do what it's suppose to do. Unfortunately, in all my testing, suddenly Saulgoode's recommended changes stopped extending the layer, even though I did nothing new to the script (just turned toggles off and on).

So, I reverted back to my calling his extend layer script and it works again. Thankfully.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 6:48 pm  (#16) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
that saulgoode script has a very different effect if there is or not a selection on the image

As behaviour it is very logic but for me was unexpected...maybe you want try to run on 2 copy of the same layer to extend, once with nothing selected
the second for example selecting all the layer ,shrinking selection of 1 px from the border

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 7:26 pm  (#17) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
Yes, I could do that, but I want the script to work out of the box for everyone, without them having to deal with these issues.

I haven't tested your suggestion, but I will try it and see if it changes anything for this input:

(when (= max-original TRUE)
      (gimp-layer-scale drawable
                        (car (gimp-image-width image))
                        (car (gimp-image-height image))
                        TRUE )
      (gimp-layer-set-offsets drawable 0 0) )


Right now I reverted back to the following because after playing with the toggles on the script (in usage, not in edit mode) it somehow "broke" his above recommendation:

(when (= max-original TRUE)
    (script-fu-sg-layer-extend-to-image-size image drawable))

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 7:40 pm  (#18) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Hy i didn't intend to say that you need to modify something in the charcoal script about selection

my point was that the sg script you call does something very different if there is a selection or not

...basically i was suggesting only to try the saulgoode script with and without selection just to check its peculiarity

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 7:45 pm  (#19) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
PC: I am aware of that. I was just stating that I want the script to work without the user having to do something to make it happen. But I am all for testing. One way for me to learn. :)

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Charcoal Script Reworked - UPDATED
PostPosted: Wed Feb 23, 2011 8:52 pm  (#20) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Try this code instead:
(when (= max-original TRUE)
      (gimp-layer-scale (car (gimp-image-get-active-layer image))
                        (car (gimp-image-width image))
                        (car (gimp-image-height image))
                        TRUE )
      (gimp-layer-set-offsets (car (gimp-image-get-active-layer image)) 0 0) )

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
Post new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) GEGL Charcoal/Colored Pencil Sketch

2

No new posts "Charcoal" sketches

6

No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2

No new posts Attachment(s) A liitle Start Help with a Script-Fu Script

3

No new posts Attachment(s) Cannot run test script-fu script via console

7



* Login  



Powered by phpBB3 © phpBB Group