Continue Discussion 29 replies
May 2015

bminney Supporter

I stumbled on this amazing standalone software for converting to b&w; FDI Black Silk. Its from the guys who wrote the Elasmuko GIMP scripts and its currently free. Not sure if you allow links here http://fd-imaging.com/?page_id=333

2 replies
May 2015 ▶ bminney

weedfreak

Links are good. Pity it does not work in GIMP with PSPI, unless someone knows how to get it working.

May 2015 ▶ bminney

patdavid

Yes, links work fine (though they are rel=“nofollow” until you reach a certain threshold).

I used to use elsamuko’s scripts quite a bit, particularly his Get Curves plugin to use a transfer function to get the RGB curves from two images with different toning. In fact, he does have many neat scripts (though many are 32-bit only and a little old, most should still work ok?).

@bminney - what in particular about FDI Black Silk was amazing to you? Is there a specific set of functionality that makes it stand out? (Yes, I know I should download it and see, but I’m busy at the moment… :wink: ).

May 2015

bminney Supporter

Difficult to explain as I’m no techy but its the ability to drag the colour pointer to get an immediate effect. It’s not dissimilar to the black and white tool in light zone, just more advanced. Not sure if they are still working on it because it does show great promise.

1 reply
May 2015 ▶ bminney

patdavid

darktable has a similar functionality in their monochrome module, I believe.

May 2015

Carmelo_DrRaw

I really love this article, it is one of the most exhaustive and precise overviews of digital B&W conversion that one can find on the net.

The only suggestion I have is related to the use of Lab “L” channel in the B&W conversion. The method proposed in the article, which is based on the
Colors → Components → Decompose, produces in my opinion a “wrong” result: the converted image is too light, because the gamma encoding of the “L” channel is different from sRGB and therefore cannot be used “directly”.

The correct way of producing a B&W image from the “L” channel is from my experience the following:

Applying those steps to Frank Kovalchek’s portrait produces this result:

to be compared with the conversion shown in the article and based on GIMP’s decompose. One can see that the explicit colorspace conversion to Lab and back to RGB produces a darker image that better matches the expected tonal range.

However, I have no idea if and how such a colorspace conversion to Lab can be realized with GIMP…

The “L” channel is actually a very powerful conversion method, particularly in the case of portrait images, as it tends to produce “natural” tonal variations in the skin, eyes and lips.

I hope this helps.

July 2016

go-go-go

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.

1 reply
July 2016 ▶ go-go-go

patdavid

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"
1 reply
July 2016 ▶ patdavid

go-go-go

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.

2 replies
July 2016 ▶ go-go-go

patdavid

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!

July 2016 ▶ go-go-go

go-go-go

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”

July 2016

bazza

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



April 2018

andrewheard

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.

1 reply
April 2018

bazza

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>"

April 2018

andrewheard

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

October 2019

Ajohn

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

1 reply
October 2019 ▶ Ajohn

patdavid

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: ).

October 2019

Ajohn

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

October 2019

afre

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

October 2019

elGordo Supporter

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…

October 2019

afre

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

October 2019

Ajohn

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

1 reply
October 2019 ▶ Ajohn

patdavid

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

October 2019

lylejk

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:

1 reply
October 2019 ▶ lylejk

Ajohn

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

1 reply
October 2019 ▶ Ajohn

patdavid

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/

October 2019

snibgo

The pseudogrey scheme, as described in PseudoGrey: 1786 Shades of Grey , can be implemented with ImageMagick like this. First, we create a CLUT (colour look-up table), with 3 channels, 4096x1 pixels:

magick ^
  -size 4096x1 xc: ^
  -fx (i-7)/w ^
  -channel R ^
    -fx "i%%16>=5&&i%%16<=8?u+1/256:u" ^
    -fx "i%%16>=14&&i%%16<=15?u+1/256:u" ^
  +channel ^
  -channel G -fx "i%%16>=9?u+1/256:u" +channel ^
  -channel B ^
    -fx "i%%16>=2&&i%%16<=4?u+1/256:u" ^
    -fx "i%%16>=7&&i%%16<=8?u+1/256:u" ^
    -fx "i%%16>=11&&i%%16<=13?u+1/256:u" ^
  +channel ^
  -depth 8 ^
  pg_clut.png

This CLUT has 1786 unique colours.

We can use it by applying it to any grayscale image with any number of bits/pixel. We must save the result with a depth of 8. For example:

magick ^
  toes.png ^
  -colorspace Gray ^
  pg_clut.png ^
  -clut ^
  -depth 8 ^
  toes_1786.png

The above commands are for Windows BAT. For bash, change line ends to backslash, don’t double the %%, and escape parentheses ( and ):

magick \
  -size 4096x1 xc: \
  -fx \(i-7\)/w \
  -channel R \
    -fx "i%16>=5&&i%16<=8?u+1/256:u" \
    -fx "i%16>=14&&i%16<=15?u+1/256:u" \
  +channel \
  -channel G -fx "i%16>=9?u+1/256:u" +channel \
  -channel B \
    -fx "i%16>=2&&i%16<=4?u+1/256:u" \
    -fx "i%16>=7&&i%16<=8?u+1/256:u" \
    -fx "i%16>=11&&i%16<=13?u+1/256:u" \
  +channel \
  -depth 8 \
  pg_clut.png

magick \
  toes.png \
  -colorspace Gray \
  pg_clut.png \
  -clut \
  -depth 8 \
  toes_1786.png
October 2019

ggbutcher

Nursing a brain-addling cold, thinking through how do do this on 0.0-1.0 floating point. I believe 0.00390625 has something to do with it… :smiley:

October 2019

Ajohn

Whoops. Tabs confused and replied to the wrong thread

I find with some B&W there is benefit but I save jpg’s at 95%. :slight_smile: Being ancient I used to regularly print 20x16 in B&W from 35mm and find digital has problems matching what I know that can do. :wink: When I hear mention of grain I get the impression people must have strange memories or maybe had everything done via the local chemists. Actually I feel that there are reason why film etc could do a better job that a pc screen.

:frowning: Anyway, still no joy with the other version. Looking around on the web it looks like it may be down to scripting changes - NORMAL and others no longer defined. One suggestion was to replace all such with 0 but yet more errors.

So currently just hope some one can sort it out. Not so sure about the version in GMIC maybe because of the sliders and not knowing how these relate to the original version. It looks to be based on channel mixing but I’m only guessing.
John