Page 25 of 61 FirstFirst ... 1521222324252627282935 ... LastLast
Results 241 to 250 of 608

Thread: The Köppen–Geiger climate classification made simpler (I hope so)

  1. #241
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    I searched a bit and find some example like here here : https://en.wikipedia.org/wiki/Natal,...rande_do_Norte
    The pattern I see is that the rainy season comes late in the summer and even later in some place than others.
    here, it's right in the middle of winter but is still Am : https://en.wikipedia.org/wiki/Jo%C3%A3o_Pessoa,_Para%C3%ADba
    I just noticed that most climate maps don't even show As, it doesn't appear in most legend.

    I might change them later. Just keep in mind that the winter/summer precipitation close to the equator tends to be a bit strange at some places.

    edit, I've finished sorting out the things : still 750

    sheet16.png
    Last edited by Azélor; 01-28-2018 at 11:26 PM.

  2. #242
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    I searched a bit and find some example like here here : https://en.wikipedia.org/wiki/Natal,...rande_do_Norte
    The pattern I see is that the rainy season comes late in the summer and even later in some place than others.
    here, it's right in the middle of winter but is still Am : https://en.wikipedia.org/wiki/Jo%C3%A3o_Pessoa,_Para%C3%ADba
    I just noticed that most climate maps don't even show As, it doesn't appear in most legend.

    I might change them later. Just keep in mind that the winter/summer precipitation close to the equator tends to be a bit strange at some places.

    edit, I've finished sorting out the things : still 750

    sheet16.png
    Great work!

    I guess I could write the GIMP version of the original script based on this (unless you want to test it first), although I'd first have to check if GIMP's colour finding functions accept hexadecimal as an input.

    About the Brazilian As, it definitely has a genuine dry season in summer, check out how the rainfall in Natal is divided between the seasons (numbers from that wikipedia link):

    Summer half-season (October-March): 390.3 mm (and more than 1/2 of this falls in March)
    Winter half-season (April-September): 1075.17 mm

    Also, the As area is about 5-10 °S: it's not sitting directly at the equator, so I don't think that can be the cause either. Originally I thought the ITCZ moved south of the area during summer (Oct-Mar), which would have caused a wind reversal (due to the direction reversal of the cross-equatorial trade winds), but I've realised that the ITCZ actually stays north of it for the whole year, so that can't be the case.

    It's an especially weird case since this is the east coast of South America, which you'd expect to be directly hit by the trade winds, but instead it's dry while the areas to the west and south of it are wet during the southern summer. Right now I'm thinking it has to be somehow connected to the movements of the South Atlantic High, as well as the continent shapes.

    Though it seems that the As probably occurs mostly along the coast, the inland regions are actually dry enough to be BS for the most part (caatinga). With that in mind, maybe I actually should shift my 50mm+50mm prec combo to BS in the tropical areas (although that has the unfortunate side effect of further messing up equatorial Africa).

    Edit:

    Ok, I tested it out and GIMP does accept hexadecimals as well as RGB as input in the functions (hooray!). I'll start scripting the temperature merging parts. Do you have a colourised table about the final temperature combos (after everything redundant has been merged)? Like the table you posted in this post showing the colours (and hexadecimal codes) after Jan and Jul temps have been merged.
    Last edited by Charerg; 01-29-2018 at 06:22 AM.

  3. #243
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    although I'd first have to check if GIMP's colour finding functions accept hexadecimal as an input.
    It is possible to do something like that? Were would you enter that input? Can you post a picture, I wonder if there is something similar in Photoshop.

    That is not what I had in mind.
    Since I have the hex code, I can generate the colors corresponding to the code in the cells, all in Excel. After that I get rid of the text so there is just the colour left.
    You end up with a color key similar to what we have in the old version. Export that as an image and use the key for the scripot to select each color, like before

    What I really want to do (at least I think it's an improvement) is to export a table to Excel containing the data, and have a script or something executed in Excel.

  4. #244
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    It is possible to do something like that? Were would you enter that input? Can you post a picture, I wonder if there is something similar in Photoshop.

    That is not what I had in mind.
    Since I have the hex code, I can generate the colors corresponding to the code in the cells, all in Excel. After that I get rid of the text so there is just the colour left.
    You end up with a color key similar to what we have in the old version. Export that as an image and use the key for the scripot to select each color, like before

    What I really want to do (at least I think it's an improvement) is to export a table to Excel containing the data, and have a script or something executed in Excel.
    I mean that when writing a script for GIMP, you can either write the following (I'll use an example function that sets the foreground colour):

    (gimp-context-set-foreground "#000046")

    or

    (gimp-context-set-foreground '(0 0 70))

    It's the same colour in both cases, but the function accepts both the RGB values (as a list) and the hexadecimal code (as a string) as input.
    Last edited by Charerg; 01-29-2018 at 01:11 PM.

  5. #245
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    Ok I think I understand. There are 2 kinds of scripts, in Photoshop at least.
    I don't know what kind of background you have, but my programming skills are pretty limited (some Java and HTML a few years ago) so this is more or less uncharted territory to me.

    The first and simpler is actually the same as a macro in Microsoft Office. The program records the actions and the macro will reproduce them if activated. Old method, long, prone to different kinds of errors...
    The other one is like coding. Photoshop uses .jsx file to store scripts, like MS use VBA (visual basics?). It is done using a text editor like Notepad.

    So all the script needs to do would be:

    Open the document (a copy ideally)
    Search for certain values (colors) and replace them with new ones.
    That's about it.

    Is that what you had in mind?


    Off topic now but you should have a look at this: http://www.think-maths.co.uk/spreadsheet
    Convert an image to an Excel spreadsheet, using RBG values and cells. It looks like an old tv screen from very close.
    Using these values, we could have recreated the image in hex code and processed the climates with the colour key.
    Last edited by Azélor; 01-29-2018 at 01:55 PM.

  6. #246
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    Ok I think I understand. There are 2 kinds of scripts, in Photoshop at least.
    I don't know what kind of background you have, but my programming skills are pretty limited (some Java and HTML a few years ago) so this is more or less uncharted territory to me.

    The first and simpler is actually the same as a macro in Microsoft Office. The program records the actions and the macro will reproduce them if activated. Old method, long, prone to different kinds of errors...
    The other one is like coding. Photoshop uses .jsx file to store scripts, like MS use VBA (visual basics?). It is done using a text editor like Notepad.

    So all the script needs to do would be:

    Open the document (a copy ideally)
    Search for certain values (colors) and replace them with new ones.
    That's about it.

    Is that what you had in mind?
    Yeah the GIMP script is an actual script written in Scheme (the programming language used with most GIMP scripts). And yes, it basically searches for the appropriate layers by name, duplicates them in a separate layer group and runs through the long list of operations about finding and replacing colours. In the end, it generates the actual climate map, the "master map" that includes all the final colour combinations used to generate the climates, the map of merged precipitations (in green), the map of merged temperatures (with the redundant categories re-coloured), as well as the re-coloured temp and prec maps.

    Here's the precipitation section's output as an example, since I already wrote that part based on that colour table you provided in this post.

    Input maps:


    Merged and re-coloured:
    genPrecM.png

    As far as I know, there's no method to create a macro in GIMP (and the script is probably more practical to write anyway since you can write it a part at a time and test each section separately).
    Last edited by Charerg; 01-29-2018 at 02:09 PM.

  7. #247
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    I will send you the spreadsheet, it will save you a lot of time.

  8. #248
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    Sheets (exact order subject to change)

    Rain:
    calculate the quantity of rain for each combinations
    % of yearly precipitation falling in summer
    % of yearly precipitations falling during the dry season

    Temp:
    calculate average temperatures for every combinations, even impossible ones
    Calculate separately the aridity threshold fro s, f and w

    Aridity
    This table compares the precipitations and the thresholds and tell if the cell is arid, semi-arid or humid, using conditions.
    //last time I did all that manually

    Hex temp
    Finding the cold of each temperature combination. Some tables are redundant
    Temperature groups with the red added to indicate hot/cold deserts and steppes.
    Right of that is the same table but with the hex code.
    Under that table, is a simplified version. I copy pasted the values. I thought I would need to keep a full table and that having hols would be a problem. Otherwise I would just have done the last one.
    Last one is trimmed down with redundant combo.

    The 3 tables on the right are the actual color combination as seen in Gimp/Ps and the instructions for the user : select this color and replace with this. I guess it could be automated too.


    hex rain:
    hex codes for the precipitations. Lot of messing around.
    Tells how to simplify the original table to have less combinations. Also include the conversion from blue/red to green.
    It would be possible to take the original value and convert them directly to green.

    Hex temp code : just contains the hex for the temperature

    Hex climate :
    Combine the hex of Red__Blue with __Green__ . Results in the yellow section.
    Redundant data is easy to spot since it only has 4 character instead of 6. And always ends with 00.

    Climate groups:
    Originally the sheet did not look like this. I regrouped the colours together.
    Tundra and Ice caps are special. The two characters in the middle don't matter.

    You can see that everywhere I'm keeping the hex value with and without a #. This is because I don't know what to do with them next so i prefer to have both. The macro only recognize hex with # and won't convert the others.


    color koppen
    I entered 2 colour keys: yours and mine

    Climates.zip

  9. #249
    Guild Grand Master Azélor's Avatar
    Join Date
    Jul 2008
    Location
    Québec
    Posts
    3,363

    Default

    Quote Originally Posted by Charerg View Post
    Yeah the GIMP script is an actual script written in Scheme (the programming language used with most GIMP scripts). And yes, it basically searches for the appropriate layers by name, duplicates them in a separate layer group and runs through the long list of operations about finding and replacing colours. In the end, it generates the actual climate map, the "master map" that includes all the final colour combinations used to generate the climates, the map of merged precipitations (in green), the map of merged temperatures (with the redundant categories re-coloured), as well as the re-coloured temp and prec maps.

    Here's the precipitation section's output as an example, since I already wrote that part based on that colour table you provided in this post.

    Input maps:


    Merged and re-coloured:
    genPrecM.png

    As far as I know, there's no method to create a macro in GIMP (and the script is probably more practical to write anyway since you can write it a part at a time and test each section separately).
    Can you share the code?

  10. #250
    Guild Artisan Charerg's Avatar
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    525

    Default

    Quote Originally Posted by Azelor View Post
    Can you share the code?
    The code can be directly read from that script I posted earlier (just unzip and read the .scm file with Notepad++). It's essentially just a text file that GIMP reads. Although that's written for the 8-step precipitation system. I'll post the 6-step script when I've finished and tested it, too, of course.

    But here's the precipitation part of the new code:
     

    ; Set the selection settings
    (gimp-context-set-antialias 0)
    (gimp-context-set-feather 0)
    (gimp-context-set-sample-merged 0)
    (gimp-context-set-sample-transparent 0)
    (gimp-context-set-sample-criterion 0)
    (gimp-context-set-sample-threshold-int 0)

    ;
    ; Precipitation processing begins
    ;

    ; Create a new channel (screen) to cover the northern half of the globe
    (set! screen-ch (car(gimp-channel-new img width height "genScreen" 0 '(0 0 0))) )
    (gimp-image-insert-channel img screen-ch 0 0)
    (gimp-image-select-rectangle img 2 0 0 width (/ height 2))
    (gimp-context-set-foreground '(255 255 255))
    (gimp-edit-bucket-fill screen-ch 0 0 100 0 0 0 0)

    ; Re-color January Precip Zones (n. hemisphere)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jan-prec '(210 200 250))
    (gimp-context-set-foreground '(0 0 250))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jan-prec '(190 170 240))
    (gimp-context-set-foreground '(0 0 225))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jan-prec '(150 130 220))
    (gimp-context-set-foreground '(0 0 200))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jan-prec '(90 80 160))
    (gimp-context-set-foreground '(0 0 175))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jan-prec '(240 235 160))
    (gimp-context-set-foreground '(0 0 150))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jan-prec '(235 0 140))
    (gimp-context-set-foreground '(0 0 125))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)

    ; Re-color January Precip Zones (s. hemisphere)
    (gimp-image-select-color img 2 jan-prec '(210 200 250))
    (gimp-context-set-foreground '(250 0 0))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jan-prec '(190 170 240))
    (gimp-context-set-foreground '(225 0 0))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jan-prec '(150 130 220))
    (gimp-context-set-foreground '(200 0 0))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jan-prec '(90 80 160))
    (gimp-context-set-foreground '(175 0 0))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jan-prec '(240 235 160))
    (gimp-context-set-foreground '(150 0 0))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jan-prec '(235 0 140))
    (gimp-context-set-foreground '(125 0 0))
    (gimp-edit-bucket-fill jan-prec 0 0 100 0 0 0 0)

    ; Re-color July Precip Zones (n. hemisphere)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jul-prec '(210 200 250))
    (gimp-context-set-foreground '(250 0 0))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jul-prec '(190 170 240))
    (gimp-context-set-foreground '(225 0 0))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jul-prec '(150 130 220))
    (gimp-context-set-foreground '(200 0 0))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jul-prec '(90 80 160))
    (gimp-context-set-foreground '(175 0 0))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jul-prec '(240 235 160))
    (gimp-context-set-foreground '(150 0 0))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-item img 2 screen-ch)
    (gimp-image-select-color img 3 jul-prec '(235 0 140))
    (gimp-context-set-foreground '(125 0 0))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)

    ; Re-color July Precip Zones (s. hemisphere)
    (gimp-image-select-color img 2 jul-prec '(210 200 250))
    (gimp-context-set-foreground '(0 0 250))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jul-prec '(190 170 240))
    (gimp-context-set-foreground '(0 0 225))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jul-prec '(150 130 220))
    (gimp-context-set-foreground '(0 0 200))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jul-prec '(90 80 160))
    (gimp-context-set-foreground '(0 0 175))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jul-prec '(240 235 160))
    (gimp-context-set-foreground '(0 0 150))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 jul-prec '(235 0 140))
    (gimp-context-set-foreground '(0 0 125))
    (gimp-edit-bucket-fill jul-prec 0 0 100 0 0 0 0)

    (gimp-selection-none img)
    (gimp-image-remove-channel img screen-ch)

    ; Merge the precipitation layers
    (set! jan-prec (car(gimp-layer-copy jan-prec 0)) )
    (set! jul-prec (car(gimp-layer-copy jul-prec 0)) )
    (gimp-image-insert-layer img jul-prec clim-group 0)
    (gimp-image-insert-layer img jan-prec clim-group 0)

    (gimp-layer-set-mode jan-prec 7)
    (gimp-layer-set-mode jul-prec 0)
    (gimp-layer-set-visible jan-prec 1)
    (gimp-layer-set-visible jul-prec 1)
    (set! prec-merg (car(gimp-image-merge-down img jan-prec 1)) )
    (gimp-item-set-name prec-merg "genPrecM")

    ; Re-color the merged precipitation layer
    ; Select and paint Af/f prec pattern
    (gimp-image-select-color img 2 prec-merg '(250 0 250))
    (gimp-image-select-color img 0 prec-merg '(250 0 225))
    (gimp-image-select-color img 0 prec-merg '(225 0 250))
    (gimp-image-select-color img 0 prec-merg '(225 0 225))
    (gimp-image-select-color img 0 prec-merg '(225 0 200))
    (gimp-image-select-color img 0 prec-merg '(200 0 225))
    (gimp-image-select-color img 0 prec-merg '(200 0 200))
    (gimp-context-set-foreground "#00FF00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint Am/f prec pattern
    (gimp-image-select-color img 2 prec-merg '(250 0 200))
    (gimp-image-select-color img 0 prec-merg '(200 0 250))
    (gimp-context-set-foreground "#00F500")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint Am/w prec pattern
    (gimp-image-select-color img 2 prec-merg '(250 0 175))
    (gimp-context-set-foreground "#00E100")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint Am/s prec pattern
    (gimp-image-select-color img 2 prec-merg '(175 0 250))
    (gimp-context-set-foreground "#00EB00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint As/s prec pattern
    (gimp-image-select-color img 2 prec-merg '(175 0 225))
    (gimp-image-select-color img 0 prec-merg '(150 0 250))
    (gimp-image-select-color img 0 prec-merg '(150 0 225))
    (gimp-image-select-color img 0 prec-merg '(125 0 250))
    (gimp-image-select-color img 0 prec-merg '(125 0 225))
    (gimp-context-set-foreground "#00D700")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint Aw/f prec pattern
    (gimp-image-select-color img 2 prec-merg '(225 0 175))
    (gimp-context-set-foreground "#00AB00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint Aw/w prec pattern
    (gimp-image-select-color img 2 prec-merg '(250 0 150))
    (gimp-image-select-color img 0 prec-merg '(250 0 125))
    (gimp-image-select-color img 0 prec-merg '(225 0 150))
    (gimp-context-set-foreground "#008700")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint BS/Aw/w prec pattern
    (gimp-image-select-color img 2 prec-merg '(225 0 125))
    (gimp-context-set-foreground "#005500")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Re-color the remaining prec patterns
    ; 1st row
    (gimp-image-select-color img 2 prec-merg '(200 0 175))
    (gimp-context-set-foreground "#00A500")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(200 0 150))
    (gimp-context-set-foreground "#007D00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(200 0 125))
    (gimp-context-set-foreground "#004B00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; 2nd row
    (gimp-image-select-color img 2 prec-merg '(175 0 200))
    (gimp-context-set-foreground "#00CD00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(175 0 175))
    (gimp-context-set-foreground "#009B00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(175 0 150))
    (gimp-context-set-foreground "#007300")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(175 0 125))
    (gimp-context-set-foreground "#004100")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; 3rd row
    (gimp-image-select-color img 2 prec-merg '(150 0 200))
    (gimp-context-set-foreground "#00C300")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(150 0 175))
    (gimp-context-set-foreground "#009100")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(150 0 150))
    (gimp-context-set-foreground "#006900")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; 4th row
    (gimp-image-select-color img 2 prec-merg '(125 0 200))
    (gimp-context-set-foreground "#00B900")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)
    (gimp-image-select-color img 2 prec-merg '(125 0 175))
    (gimp-context-set-foreground "#002D00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint BW/BS
    (gimp-image-select-color img 2 prec-merg '(150 0 125))
    (gimp-image-select-color img 0 prec-merg '(125 0 150))
    (gimp-context-set-foreground "#005F00")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    ; Select and paint BW
    (gimp-image-select-color img 2 prec-merg '(125 0 125))
    (gimp-context-set-foreground "#003700")
    (gimp-edit-bucket-fill prec-merg 0 0 100 0 0 0 0)

    (gimp-selection-none img)
    ;
    ; Precipitations processed
    ;;;

    Keep in mind that this is written for GIMP using the functions and the programming language that GIMP uses. So I'm not sure how difficult or easy it would be to port the code to work with PhotoShop.
    Last edited by Charerg; 01-29-2018 at 04:26 PM.

Page 25 of 61 FirstFirst ... 1521222324252627282935 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •