Digital B&W Conversion (GIMP)

Hi David,

Thanks for the wondering article and the script. However, I encountered errors in your color decompose script. After checking the code, I found that:

“YCbCr ITU R470 256” should be written as “YCbCr_ITU_R470_256”

Likewise, “YCbCr ITU R709 256” should be written as “YCbCr_ITU_R709_256”

Hope this help.

Hi @go-go-go,

Those terms should be correct for the last stable GIMP:

; YCbCr ITU R470 256
(define tmp (plug-in-decompose 1 Image Drawable "YCbCr ITU R470 256" 0))

(define lyr (gimp-layer-new-from-drawable ( car( gimp-image-get-active-layer (car tmp) )) Image) )
(gimp-item-set-name (car lyr) "Luma - y470f")
(gimp-image-add-layer Image (car lyr) -1)

; YCbCr ITU R709 256
(define tmp (plug-in-decompose 1 Image Drawable "YCbCr ITU R709 256" 0))

(define lyr (gimp-layer-new-from-drawable ( car( gimp-image-get-active-layer (car tmp) )) Image) )
(gimp-item-set-name (car lyr) "Luma - y709f")
(gimp-image-add-layer Image (car lyr) -1)

From the PDB explorer:

decompose-type STRING        
        What to decompose: "RGB", "Red", "Green", "Blue", "RGBA", 
        "HSV", "Hue", "Saturation", "Value", "HSL", "Hue (HSL)", 
        "Saturation (HSL)", "Lightness", "CMY", "Cyan", "Magenta", 
        "Yellow", "CMYK", "Cyan_K", "Magenta_K", "Yellow_K", 
        "Alpha", "LAB", "YCbCr_ITU_R470", "YCbCr_ITU_R709", 
        "YCbCr ITU R470 256", "YCbCr ITU R709 256"

That’s strange. Coz after reading your message, I retried a couple of time. In my setup (I am using Ubuntu and I installed GIMP directly from the main repository (version 2.8.16)), the script only works when I have the underscores like this “YCbCr_ITU_R470_256”. Otherwise, it keeps popping up error message.

That is odd. I’ll fire up another Ubuntu box and see what’s going on. I should also probably move that script over to github so others can hack at it and submit PR’s as needed. Thanks for the heads up!

And when I check the plug-in-browser. it says:

What to decompose: “RGB”, “Red”, “Green”, “Blue”, “RGBA”, “HSV”, “Hue”, “Saturation”, “Value”, “HSL”, “Hue (HSL)”, “Saturation (HSL)”, “Lightness”, “CMY”, “Cyan”, “Magenta”, “Yellow”, “CMYK”, “Cyan_K”, “Magenta_K”, “Yellow_K”, “Alpha”, “LAB”, “YCbCr_ITU_R470”, “YCbCr_ITU_R709”, “YCbCr_ITU_R470_256”, “YCbCr_ITU_R709_256”

i use blend of c2g and emboss (gmic) for noise air (atmosphere)



Beware & sadly C2G does not feature in the latest GIMP 2.10. I shouldn’t have let 2.10 uninstall 2.08 because now I don’t have access to C2G. Really annoying.

Your have installed http://gegl.org/ ?

gegl -p -o output.png -x "<gegl><node operation='gegl:c2g'><params><param name='radius'>1800</param><param name='samples'>16</param><param name='iterations'>16</param></params></node><node operation='gegl:load'><params><param name='path'>input.png</param></params></node></gegl>"

1 Like

Thanks bazza but all good! C2G is now located @ main menu > Colors > Desaturate > Color to Grayscale.

I’m having a problem with pseudogrey. It generates the following error

Execution error for ‘Pseudogrey’:
Error: eval: unbound variable: NORMAL

Gimp 2.10.12

I find it very useful for some B&W conversions and will feel a bit lost without it. Hopping some one can sort. Tried the version of Pat David’s site. Seems to be the only copy around.

John

There’s actually a version bundled in G’MIC as a filter as well that even has more options - might be worth trying that one instead (plus you get a ton of neat G’MIC filters as well… :slight_smile: ).

It may have been in but has gone. Just updated it as well with a lot of on test stuff but still no sign of it and I liked the just apply and job done.

:slight_smile: I daren’t say anything about the useful filters as I’m photo only.

John

It exists in the G’MIC filter called “Black & White”.

1 Like

Wow @patdavid, great thorough article…apparently I screwed up by not poking through all of the history of this forum prior to the time I joined. Wonder what other nuggets I will discover…

1 Like

Better late than never. You aren’t :crazy_face: like me, reading almost everything.

2 Likes

I may have found an alternative. Pseudogrey is mentioned but no signs of it in the application. Delalaboratory

https://code.google.com/archive/p/delaboratory/downloads

:wink: Obviously I shouldn’t have stuck curves on the top of the layer stack but wanted to see if it functioned as the others. The controls if any for all of the layers that are added remain active. Very photographer friendly. Just wish it had gimp levels as being able to set the output span can be very useful.

I had to edit the make file to get it to compile on Linux 64bit by forcing the selection. Just commented out the if else around it.

Quick play

:pensive: It couldn’t open a user directory and I didn’t check if it can save a file. Hope so :wink:

John

I can look at updating the script to see what went wrong.

In the meantime, you can also do this manually pretty easily:

https://patdavid.net/2012/06/true-pseudogrey-in-gimp.html

1 Like

I have GIMP 2.10.12 and the Pseudogrey Script-fu that I have still works. Still, one of my favorites and it runs quick. :slight_smile:

Maybe you could post it as an attachment on here. I tried the google drive one via Pat’s site and found another but both the same.

John

Actually, on that note now that @lylejk has jogged my memory:

http://gimpchat.com/viewtopic.php?f=23&t=4245&p=227917#p227916

Got that from his post a while back:
https://discuss.pixls.us/t/pseudogrey-script-fu-in-need-of-an-update/