| Welcome, Guest |
You have to register before you can post on our site.
|
| Latest Threads |
GIMP 3.0.6 only uses a fe...
Forum: General questions
Last Post: rich2005
3 hours ago
» Replies: 2
» Views: 173
|
GIMP 3 script-fu not load...
Forum: Scripting questions
Last Post: Ofnuts
6 hours ago
» Replies: 1
» Views: 69
|
What exactly tutorials ar...
Forum: General questions
Last Post: SleipnirTheHorse
Yesterday, 05:35 PM
» Replies: 7
» Views: 831
|
Déformation par "Cage"
Forum: General questions
Last Post: rich2005
Yesterday, 09:27 AM
» Replies: 7
» Views: 377
|
Average colour in GIMP - ...
Forum: Extending the GIMP
Last Post: Ofnuts
12-02-2025, 08:57 PM
» Replies: 5
» Views: 351
|
Plugins with Gimp 3.2 RC1...
Forum: General questions
Last Post: rich2005
12-02-2025, 08:10 PM
» Replies: 1
» Views: 214
|
Isse with applying Layer ...
Forum: General questions
Last Post: rich2005
12-02-2025, 08:21 AM
» Replies: 1
» Views: 181
|
Batcher - Batch Image Pro...
Forum: Extending the GIMP
Last Post: chuckhenrich
12-01-2025, 10:51 AM
» Replies: 7
» Views: 8,549
|
plugin-py3-export-all
Forum: Extending the GIMP
Last Post: Ofnuts
12-01-2025, 08:19 AM
» Replies: 6
» Views: 513
|
pencil don't have full co...
Forum: General questions
Last Post: rich2005
11-30-2025, 08:03 PM
» Replies: 4
» Views: 3,507
|
|
|
| Darktable Images Opening In Task Bar At Bottom Of Screen |
|
Posted by: NorthernHarrier - 05-03-2024, 02:13 AM - Forum: Windows
- Replies (5)
|
 |
I just installed a new Windows 11 Dell desktop computer and re-installed GIMP (version 2.10.36) and darktable (version 4.6.1). I spent a long time figuring out how to get photo thumbnails to show up at the top of the screen again when I open photos in GIMP, as they did with my old computer. However, the problem I cannot solve is this: when I open a raw image through GIMP from my photo files stored on my computer drive, the image loads first in darktable as it should, but the darktable window with the image appears at the bottom of my screen, in the task bar, in a tiny thumbnail. In order to close it, so it will re-open in GIMP for editing, I have to hover my mouse over the tiny image and click on it to get it to move into the main GIMP layout in larger form. The images are not opening in darktable in larger form on the main GIMP layout as they always did with my old computer. I tried uninstalling and re-installing darktable, but that didn't help.
The attached image shows where the tiny thumbnail of the photo opens in darktable when I open a raw image in GIMP from my camera. I've circled the tiny thumbnail of the darktable window that opens at the bottom of my screen when I open a raw image in GIMP.
How can I get the images to open in the darktable window within the main GIMP layout, so I can close them and they will re-appear in GIMP for editing as they should? I can't find any menu item in GIMP or any preference item in darktable that will solve this issue. Any help you can provide will be greatly appreciated - there is no other online help addressing this issue that I can find. Thanks!
|
|
|
| Getting active image and layer in Python scripts |
|
Posted by: Ofnuts - 05-02-2024, 07:32 AM - Forum: Tutorials and tips
- No Replies
|
 |
If your script is correctly written, in particular its "registration" code, it gets the active image (and the active layer) as parameters:
Code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from gimpfu import *
def theCode(theImage,theDrawable):
pdb.gimp_message('Running on image "%s" (%d) on drawable "%s"' \
% (theImage.name,theImage.ID,theDrawable.name))
register(
'the_registration_atom',
'Example registration of a python plugin (short description, pops up in menus)',
'Example registration of a python plugin (long-winded help that shows in the PDB browser)',
'Author','Copyright owner','2021',
'Test menu item',
'*', # works on all image types
[
(PF_IMAGE, "image", "Input image", None), # Active image if called from the UI
(PF_DRAWABLE, "drawable", "Input drawable", None), # Active drawable if called from the UI
# Other parameters would come here
],
[
# if you want to be really nice and your script creates image/layers, you can return
# then and descrive their type here. Makes it easier for other scripts calling your script.
],
theCode,
menu='<Image>/Test/',
)
main()
Notes:
- An important part is the use of the menu named argument. This makes the registration use the new variant. The older variant where the 7th argument is a full path to the menu item (which is still found in some examples) behaves a bit differently.
- The "drawable" can be a layer (usual case) but also a layer mask or a channel or even a layer group. Some scripts can work on all types, others may want just a layer. You can use a PF_LAYER instead of a PF_DRAWABLE but the Gimp error message isn't too user-friendly. Better check in your code and react appropriately.
- Since the script works on a drawable, the menu item is disabled if there is no active drawable in the image (this can happen after you deleted all layers). You can of course remove the drawable argument if the script doesn't require a specific drawable (runs on all layers, or generates new ones)
- Since the script works on an image, the menu item is disabled if there is no image in Gimp. You can of course remove the image argument if the script doesn't require a specific image (runs on all images, or loads/generates new ones)
An example script "core" with long-winded comments:
regdemo.zip (Size: 2.2 KB / Downloads: 804)
|
|
|
|