Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,814
» Latest member: scave
» Forum threads: 7,293
» Forum posts: 39,770

Full Statistics

Latest Threads
ofn3-export-layers
Forum: Extending the GIMP
Last Post: Ofnuts
20 minutes ago
» Replies: 8
» Views: 172
Plugins
Forum: Gimp 2.99 & Gimp 3.0
Last Post: sparky 1987
1 hour ago
» Replies: 2
» Views: 120
Converting python plugin-...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: iiey
3 hours ago
» Replies: 24
» Views: 1,355
Why am I getting black an...
Forum: General questions
Last Post: Ofnuts
8 hours ago
» Replies: 4
» Views: 224
ConvertComic to PDF via b...
Forum: Other graphics software
Last Post: vitforlinux
8 hours ago
» Replies: 2
» Views: 315
Converseen batch image pr...
Forum: Other graphics software
Last Post: denzjos
Yesterday, 07:09 AM
» Replies: 0
» Views: 42
Python Scripting Help Nee...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: Ofnuts
03-29-2025, 09:08 PM
» Replies: 1
» Views: 113
Error while parsing
Forum: General questions
Last Post: rich2005
03-29-2025, 05:45 PM
» Replies: 1
» Views: 116
GIMP PDFs have transparen...
Forum: General questions
Last Post: rich2005
03-29-2025, 05:35 PM
» Replies: 13
» Views: 533
Need help removing backgr...
Forum: General questions
Last Post: rdoty
03-29-2025, 04:57 PM
» Replies: 8
» Views: 338

 
  White Balance, Auto Input Level algorthms
Posted by: BrianLink - 09-25-2023, 06:20 PM - Forum: General questions - No Replies

I've poked around the source code but am having difficulties and am currently trying to figure out how white balance  / auto levels is performed. 

I think I was able to figure out gimp_operation_levels_map as the root for determining setting gamma but there is a bunch of contextual stuff I am missing.  

Example: I'm thinking gimp makes a copy of the xcf representation of the image and performs an update to that. Then there is a history of steps and one can jump back to an intermediate step.  

Via bimp, using some of the procedures out of pdb, i noticed that the intermediate steps are not necessarily saved and may be overwritten.  For example gimp-drawable-levels (to set gamma) followed by gimp-drawable-levels-stretch wipes out the levels gamma change whereas reverse order works.  And ditto for color-levels-gui. 

Anyway pointing me to something high level to get around the 15 levels of indirection used in gimp would help.

Thanks

Print this item

  What does a bear do ?
Posted by: rich2005 - 09-24-2023, 01:17 PM - Forum: Watercooler - Replies (9)

The city authority cut down some old trees at the back of my house. The trees belong to them, and found to be diseased. A shame to see them go, someone counted the rings and came up with 164 years old.

   

But it reminded me of this cartoon, About what bears do....

   

Print this item

  Color working method help
Posted by: pixelmixer - 09-24-2023, 11:44 AM - Forum: Gimp 2.99 & Gimp 3.0 - Replies (2)

Hi,

I'm working in GIMP built-in sRGB, 16-bit non-linear integer.
Converting to an 8-bit non-linear integer in Adobe RGB 1998.



Code:
(iccPth "/home/mark/Artwork/Misc/Adobe ICC Profiles (end-user)/RGB/")
(icc (string-append iccPth "AdobeRGB1998.icc"))
(intent COLOR-RENDERING-INTENT-PERCEPTUAL)
(bpc 1)

(gimp-image-convert-precision dstImg PRECISION-U8-NON-LINEAR)
(gimp-image-convert-color-profile-from-file dstImg icc intent bpc)



And then export as a jpeg without any soft-proofing.

However the exported jpeg looks different in Krita and Image Magick to GIMP,
in Krita and Image Magick the colors are less chromatic, which is what I'd expect.


Anything obvious that might cause this jpeg to look different in GIMP?



Attached Files Thumbnail(s)
   
Print this item

  Color correct image based on known background color
Posted by: pluder - 09-23-2023, 11:08 AM - Forum: General questions - Replies (2)

Maybe this is a good idea, maybe not. 

I take pictures of different objects on the same background, with the same light source and intensity all the time. I use Gimp to edit those pictures. The camera will vary exposure, aperture, ISO, etc... depending on the object which will change the apparent color of the background. 

If I know the actual color of the background (say 90.7, 85.8, 85.8 in a RBG format) how would I apply a filter to color correct the entire image based on the change needed between the current background color and the known background value?

I am looking to try and get the most consistent/accurate colors for the objects. If this is not a good option, please let me know if you think there is a better way to do this. Bear in mind that I am really trying to make up for the camera and getting a better/different camera is not a viabile option at this time.

Print this item

  Single window
Posted by: sl60 - 09-23-2023, 05:08 AM - Forum: General questions - Replies (3)

Out of nowhere  Gimp switched to single window mode with fixed panels. So I unchecked the single window box and it reverted to a blank page. When I go to Windows>Dockable Dialogs and click on the Layers Panel, for example, it opens the panel but it jumps to full page spread out in a horizontal format.

How can I restore my set-up to a normal page with movable panels for Layers, Tools, etc.?

Print this item

  Gimpfu missing in GIMP v. 2.10.34 ?
Posted by: jcj2249 - 09-22-2023, 08:29 PM - Forum: General questions - Replies (1)

I am doing astrophotography and I added the PyAstro for GIMP plugins (https://stargazy.weebly.com/pyastro-for-gimp.html). 
These plugins use Python and my system is macOS 11.7.10.
They work perfectly on GIMP v. 2.10.32.
But they don’t work at all on GIMP v. 2.10.34.
The error is located in the scripts at : from gimpfu import *
Is the gimpfu file missing in GIMP v. 2.10.34 ?

Print this item

Python Python Out of Sequence?
Posted by: Kjaamor - 09-22-2023, 04:31 PM - Forum: Scripting questions - Replies (2)

I wrote a python script that removes a background colour from an image, orientates the remainder, resizes the image and then overwrites the existing image file. All of the functions work as expected...but they don't happen in the order expected. The final two lines (below) happen in reverse order.


Quote:    pdb.gimp_image_resize(imageToBeResized, 900, 1500, widthoffset, heightoffset)
    pdb.gimp_file_save(imageToBeResized, drawable, imageFileName, imageFileName)


 So the image will overwrite before being resized, and I have no idea why this is the case.

  1. Running the second line twice makes no difference - it will continue to overwrite without resizing.
  2. Duplicating both lines (1,2,1,2) actually shifts the affected area so that it saves in 900*1500 but to the image focus' upper left.
Anyone have any idea why this would be?

Full code below for reference:

Quote:def postmatch_resize(image):
    imageFileName = pdb.gimp_image_get_filename(image)
    imageToBeResized = gimp.image_list()[0]
    drawable = pdb.gimp_image_active_drawable(imageToBeResized)
    pdb.gimp_image_crop(imageToBeResized, 1900, 1500, 0, 0)
    colorToDelete1 = gimpcolor.RGB(9, 246, 57)
    colorToDelete2 = gimpcolor.RGB(6, 185, 42)
    colorToDelete3 = gimpcolor.RGB(7, 216, 50)
    colorToDelete4 = gimpcolor.RGB(4, 123, 28)
    colorToDelete5 = gimpcolor.RGB(5, 154, 35)
    colorToDelete6 = gimpcolor.RGB(3, 93, 21)
    colorToDelete7 = gimpcolor.RGB(2, 62, 14)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete1)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete2)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete3)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete4)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete5)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete6)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.gimp_image_select_color(imageToBeResized, 0, drawable, colorToDelete7)
    if pdb.gimp_selection_is_empty(imageToBeResized) == False:
        pdb.gimp_edit_clear(drawable)
    pdb.plug_in_autocrop(imageToBeResized, drawable)
    preheight = pdb.gimp_image_height(imageToBeResized)
    prewidth = pdb.gimp_image_width(imageToBeResized)
    heightoffset = 1500 - preheight
    widthoffset = (900 - prewidth)/2
    pdb.gimp_image_resize(imageToBeResized, 900, 1500, widthoffset, heightoffset)
    pdb.gimp_file_save(imageToBeResized, drawable, imageFileName, imageFileName)

I doubt very much that the above cobbled together solution is optimal so I'll take pointers but I'm also curious as to why it doesn't work sequentially? I thought that was the whole point.

Print this item

  Fill selected space with image
Posted by: pathblazerphoto - 09-22-2023, 01:50 PM - Forum: General questions - Replies (1)

Hi All

So I have an image with a blank white space and a hand around it, I am selecting the white space and now want it to add an image into that white space, adjusting for perspective etc. Is this possible in gimp? I am aware of how to do it manually, was hoping of a quicker method

Print this item

  Photomerge Capability
Posted by: Bernard46 - 09-22-2023, 08:18 AM - Forum: General questions - Replies (2)

There's a very useful function in Adobe Photoshop Elements called Photomerge - this allows you to scan a very large document in several images and then combine them into a single image by just opening each one in the program and choosing the Photomerge tool. There are variations in the tool like Exposure or Panorama - it is the Panorama one I'm particularly interested in. I haven't been able to find anything similar in function or simplicity in GIMP - can anyone tell me if a Photomerge function is available in GIMP please?

Print this item

  How do I change selection behaviors?
Posted by: Greymalkin - 09-22-2023, 04:11 AM - Forum: General questions - Replies (4)

I'm currently using Gimp 2.14 on Windows 11. I am having trouble with the selection tool. This is a problem with all selection tools (rectangular, oval, cage, freehand, ect). 

Old behavior (desired): Click selection tool. Select the area of the canvas you want. Work inside the area. Click outside of the selected area. The area is un-selected. To add to the selected area, hold + and select a second area. To remove from the selected area, hold - and select the area to un-select. If no area has been selected, you may work on the entire canvas.

New behavior (make it stop!): Click selection tool. Select the area of the canvas you want. Area remains selected until you un-select it manually. To un-select you hold - and select the area you want to have un-selected. Unless an area has been selected, no tools will work on the canvas. You must select the entire canvas to be able to work on the entire canvas. If the entire canvas has been selected, you must un-select the entire canvas manually to be able to select a small part of the canvas.

The new behavior has been a nightmare for my workflow. I am constantly being forced to zoom out and remove all selected areas manually. I also have to constantly reselect the entire canvas so I can get back to work on the bigger picture. It's tedious and very annoying.

How do I get the old behavior back?

Print this item