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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,619
» Latest member: Jānis
» Forum threads: 7,481
» Forum posts: 40,855

Full Statistics

Latest Threads
how to change default pas...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: JibDobFackle
34 minutes ago
» Replies: 24
» Views: 11,904
CMYK color mode Gimp 2.10
Forum: Extending the GIMP
Last Post: rich2005
6 hours ago
» Replies: 18
» Views: 81,718
Endianess of pixel data i...
Forum: Scripting questions
Last Post: Ofnuts
7 hours ago
» Replies: 3
» Views: 71
Color is not translating ...
Forum: General questions
Last Post: Mfrench4712
11 hours ago
» Replies: 0
» Views: 46
Edge detect leaves invisi...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: marty39
Yesterday, 12:18 PM
» Replies: 3
» Views: 137
cannot find instructions ...
Forum: General questions
Last Post: rich2005
Yesterday, 09:19 AM
» Replies: 4
» Views: 164
3.0.4 crashes all the tim...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: mayorpunk
07-13-2025, 11:13 PM
» Replies: 0
» Views: 47
Warped text
Forum: General questions
Last Post: Tas_mania
07-13-2025, 11:20 AM
» Replies: 2
» Views: 213
GEGL Plugins for GIMP 3.0...
Forum: Extending the GIMP
Last Post: BeaverGEGLFreak
07-13-2025, 10:42 AM
» Replies: 1
» Views: 270
Blur/Sharp tool
Forum: General questions
Last Post: AWysy
07-13-2025, 08:05 AM
» Replies: 5
» Views: 333

 
  TWO windows
Posted by: silverbirch2003 - 12-09-2023, 11:25 PM - Forum: General questions - Replies (6)

Hi
    just  wondering is it  possible  to  get  2  windows  up  ?
Im  thinking of  using  the  clone  tool  and   getting   content  from
one  window   onto   a  pic  on the  other  window  ...

thanks  for  advice or  comments

Print this item

Python Where to find an installed plugin?
Posted by: Krikor - 12-09-2023, 04:05 PM - Forum: Extending the GIMP - Replies (10)

Hey guys,

I installed a plugin to test it but I can't find it anywhere.
I looked inside the Python-Fu menu, I didn't find it.
Also in Filters - Python-Fu, without success.

In fact I'm not even sure what the name of this plugin would be.

Could anyone reveal the location of this plugin? Please!

Below is the plugin code: 

Code:
#!/usr/bin/env python
#grow-shrink-live.py
# Creator: TT
# This should allow user to adjust grow/shrink current selection with live preview
# Open Source
from gimpfu import *
import gtk

# Global variables to store the parameters used for our effect/work to show preview or actual layer when user OK it
global_param1 = 0 #in this example it's shrinkgrow radius
global_param2 = 0   #in this example it's feather_radius
global_param3 = 10  #in this example it's iterations
global_param4 = 0   #in this example it's enhance_shadows

image = 0 #we'll set these when dialog() is called so that we can access them later
drawable = 0
has_preview = False
preview_layer = 0
#for this operation
selection_channel = 0

def apply_effect(layer): #function to do work on either preview layer or actual drawable when user clicks OK
   global image
   radius = global_param1
   feather_radius = global_param2
   pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,selection_channel) #first we selected the original saved channel
   if radius < 0:
       pdb.gimp_selection_shrink(image,-radius)
   else:
       pdb.gimp_selection_grow(image,radius)
   pdb.gimp_selection_feather(image,feather_radius)
   #do something to it to show it's effect so that user can distinguish between selected area or not
   pdb.gimp_drawable_edit_fill(layer,FILL_FOREGROUND)

   #pdb.gimp_ellipse_select(image,image.width/2-width/2,image.height/2-height/2,width,height,CHANNEL_OP_REPLACE,TRUE,FALSE,0)
   #pdb.gimp_drawable_invert(layer,TRUE)
   #pdb.gimp_selection_none(image)
   gimp.displays_flush()

def apply_final(layer): #wrapper to apply effect on final and remove preview_layer meant to be called by on_ok_button_clicked
   global preview_layer
   #pdb.gimp_image_undo_group_start(image) #so it's undone in Ctrl+Z
   pdb.gimp_image_undo_enable(image) #so that user can undo this next step
   apply_effect(preview_layer)
   #pdb.gimp_image_undo_group_end(image)
   if has_preview:
       pdb.gimp_image_remove_channel(image,selection_channel) #so that we don't leave a saved channel laying around
       pdb.gimp_image_remove_layer(image,preview_layer)
   pdb.gimp_image_set_active_layer(image,drawable)
   pdb.gimp_context_set_foreground(save_foreground)
   gimp.displays_flush()
 
# Function to update the live preview
def update_live_preview(): #this is called everytime some parameter changes
   global global_param1, global_param2, global_param3, global_param4
   global image,drawable
   global has_preview,preview_layer #deal with preview layer
   global selection_channel #this will save our current selection
   # Apply your plugin's effect using the current parameters
   # Use global_param1 and global_param2 to access the user's inputs
   if not has_preview: #create a preview layer
       #pdb.gimp_message("Creating preview")
       preview_layer = pdb.gimp_layer_new(image,image.width,image.height,RGBA_IMAGE,"preview",70,LAYER_MODE_NORMAL)
       pdb.gimp_image_insert_layer(image,preview_layer,None,0) #insert top most so we see it
       non_empty,x1,y1,x2,y2 = pdb.gimp_selection_bounds(image)
       if non_empty == TRUE:
           pass #there's already a selection
       else:
           pdb.gimp_selection_all(image) #if there's no selection we just select the whole image and work with that  
       selection_channel = pdb.gimp_selection_save(image)
       has_preview = True #now set it true so we can deal with existing layer in later calls
   else: # already have preview layer
       pass
       #pdb.gimp_message("Removing existing and creating new Preview")
       pdb.gimp_image_remove_layer(image,preview_layer) #remove it to create a new one to work on
       preview_layer = pdb.gimp_layer_new(image,image.width,image.height,RGBA_IMAGE,"preview",50,LAYER_MODE_NORMAL)
       pdb.gimp_image_insert_layer(image,preview_layer,None,0) #insert top most so we see it
   pdb.gimp_image_set_active_layer(image,preview_layer)
   #debug message
   #pdb.gimp_message(str(global_param1)+","+str(global_param2)+","+str(global_param3)+","+str(global_param4))

   apply_effect(preview_layer)
 
   # Update the live preview layer with the modified image
 
save_foreground = 0
hilightcolor = (255,0,0)
def dialog(image_, drawable_):
   global image, drawable, save_foreground
   #save these for updates
   image = image_
   pdb.gimp_image_undo_disable(image) #for speed and also when user undo it doesn't see our preview creations/deletions
   drawable = drawable_
   save_foreground = pdb.gimp_context_get_foreground()
   pdb.gimp_context_set_foreground(hilightcolor)

   dialog = gtk.Dialog("Shrink/Grow Feather Selection Live Preview", None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
   dialog.set_default_size(600, 100)

   # Create an HBox to hold the label and slider -------------------------------------------------------------
   hbox = gtk.HBox()
   dialog.vbox.pack_start(hbox, expand=True, fill=True)

   # Create a label on the left-hand side
   label1 = gtk.Label("Shrink/Grow Radius:")
   hbox.pack_start(label1, expand=False, fill=False, padding=5)

   # Create an adjustment for the HScale (slider) with a range from 10 to 90
   adjustment1 = gtk.Adjustment(value=0, lower=-400, upper=400, step_incr=1, page_incr=0)
   param1_scale = gtk.HScale(adjustment=adjustment1)
   param1_scale.set_digits(0)  # Display only integers
   hbox.pack_start(param1_scale, expand=True, fill=True, padding=5)
   # Connect callback functions for user interaction
   param1_scale.connect("value-changed", on_param1_changed)

   # # Create an HBox to hold the label and slider -------------------------------------------------------------
   hbox2 = gtk.HBox()
   dialog.vbox.pack_start(hbox2, expand=True, fill=True)

   # Create a label on the left-hand side
   label2 = gtk.Label("Feather Radius:")
   hbox2.pack_start(label2, expand=False, fill=False, padding=5)

   # Create an adjustment for the HScale (slider) with a range from 10 to 90
   adjustment2 = gtk.Adjustment(value=0, lower=0, upper=400, step_incr=1, page_incr=0)
   param2_scale = gtk.HScale(adjustment=adjustment2)
   param2_scale.set_digits(0)  # Display only integers
   hbox2.pack_start(param2_scale, expand=True, fill=True, padding=5)
   # Connect callback functions for user interaction
   param2_scale.connect("value-changed", on_param2_changed)

   # # Create an HBox to hold the label and slider -------------------------------------------------------------
   # hbox3 = gtk.HBox()
   # dialog.vbox.pack_start(hbox3, expand=True, fill=True)

   # # Create a label on the left-hand side
   # label3 = gtk.Label("iterations:")
   # hbox3.pack_start(label3, expand=False, fill=False, padding=5)

   # # Create an adjustment for the HScale (slider) with a range from 10 to 90
   # adjustment3 = gtk.Adjustment(value=10, lower=1, upper=30, step_incr=1, page_incr=0)
   # param3_scale = gtk.HScale(adjustment=adjustment3)
   # param3_scale.set_digits(0)  # Display only integers
   # hbox3.pack_start(param3_scale, expand=True, fill=True, padding=5)
   # # Connect callback functions for user interaction
   # param3_scale.connect("value-changed", on_param3_changed)

   # Add an OK button
   ok_button = dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
   ok_button.connect("clicked", on_ok_button_clicked)
   # Show the dialog
   dialog.show_all()
   update_live_preview() #call this once so we see effect
   dialog.run()
 

# Callback function for updating the live preview when param1 changes
def on_param1_changed(scale):
   global global_param1
   global_param1 = scale.get_value()
   update_live_preview()

# Callback function for updating the live preview when param2 changes
def on_param2_changed(scale):
   global global_param2
   global_param2 = scale.get_value()
   update_live_preview()

def on_param3_changed(scale):
   global global_param3
   global_param3 = scale.get_value()
   update_live_preview()

# Callback function for the OK button
def on_ok_button_clicked(button, data=None):
   global drawable
   apply_final(preview_layer) #preview layer because we don't want to apply the invert to final layer it's just for viewing
   button.get_toplevel().destroy() #destroys the gtk dialog window
# Register the Python-Fu plugin
register(
   "python_fu_grow_shrink_live",
   "Grow/Shrink Current Selection with Live Preview",
   "Grow/Shrink Current Selection with Live Preview",
   "TT",
   "TT",
   "NAME",
   "<Image>/Python-Fu/Live Preview/Grow-Shrink Live",  # Menu location
   "*",  # Image type
   [],
   [],
   dialog
)

main()


Thx.

Print this item

  Pen tools not working
Posted by: Stephen Liu - 12-09-2023, 02:07 PM - Forum: General questions - Replies (11)

Hi all,

GIMP version 2.10.30
OS - Ubuntu 22.04.3 LTS desktop

My Pen Tools are not working.  Please advise whehter to check and how to fix the problem.

Thanks

Regards

Print this item

Scheme Batch export all opened images at once V2 (more options)
Posted by: PixLab - 12-09-2023, 08:51 AM - Forum: Extending the GIMP - No Replies

Related to this one > https://www.gimp-forum.net/Thread-Export...MP-at-once ,
if it's your first time here, this script is an .scm to put in the scripts folder and it will export ALL opened images at once (batch export) to the format you chose like JPG, WebP, PNG, TIFF, BMP, and even export animation and BigTiff,
yes all your OPENED images at once! (click on the link above to see used cases Wink )

What's new in version 2? and the last! (delete the previous file (sg-save-all-open-a.scm), although I did change the declaration so both could work side by side)
You can control your inter-action.
> Fully auto,
> Fully Manual
> or use the latest settings used per image in fully auto (you have to RTM, though, for that last option)
Oh.. and last but not least I also wrote a manual (ReadTheManual) with screenshots  Big Grin
And few other updates like BigTiff is accessible as well as animated WebP (explained at the end of the RTM), etc...

Download:

.7z   pxl-export-all-images-as.7z (Size: 271.91 KB / Downloads: 713)

After Rich2005 inspiration, this second version is due to Ofnuts who did try to put me on the right path (pun non intended)   Wink

   

Print this item

  Transparent objects
Posted by: kikateadrunker - 12-09-2023, 03:32 AM - Forum: General questions - Replies (4)

ENG 
Hello, forum people! Smile

I’ll tell you about a situation that I can’t figure out without the help of experts in this topic: I tried to cut out a glass, but couldn’t make it transparent for the background on which I placed it Sad

Can anyone tell me how to place transparent objects while maintaining their transparency? 


I would be very grateful for your help in this matter! 

РУ

Привет, обыватели форума! Smile

Расскажу о ситуации, с которой не смогу разобраться без помощи знатаков в этой теме: Попытался вырезать стакан, но не смог сделать его прозрачным для фона, на который его поставил Sad

Кто может подсказать, как можно ставить прозрачные объекты, при этом, сохраняя их прозрачность? 

Буду очень благодарен за вашу помощь в этом вопросе! 

УКР

Привіт, люди форуму! Smile

Спробував вирізати склянку, але не зміг зробити її прозорою для фону, на яку її поставив Sad

Хто може підказати, як можна ставити прозорі об'єкти, при цьому, зберігаючи їх прозорість? 

Буду дуже вдячний за вашу допомогу у цьому питанні!

Print this item

Scheme RUN-WITH-LAST-VALS in Script-Fu is not what you might think
Posted by: PixLab - 12-09-2023, 01:49 AM - Forum: Scripting questions - No Replies

This RUN-WITH-LAST-VALS gave me a hard time, thus this is what I discovered on how it behaves (Related to this thread)

RUN-WITH-LAST-VALS Works per image session (ID would be correct), RUN-WITH-LAST-VALS cannot be transmitted to another opened image.

Thus if you have a bunch of images opened, you cannot run first RUN-INTERACTIVE on the first image to export and then RUN-WITH-LAST-VALS for the other images, thinking it will use the last settings you did use on the first image... That Will Not Work

How it works?
Example I want to export 5 opened images as JPG, but previously I did exported [Image 1] and [Image 3], the RUN-WITH-LAST-VALS will run like RUN-NONINTERACTIVE using the last values it found in the Image's session/ID in [Image 1] and [Image 3]
But will run RUN-INTERACTIVE for image [Image 2], [Image 4] and [Image 5], because there is no history in those images' session/ID of an export (whatever type of "Export")

There is also a "caveat", you export a second time but with another image/file type,
For example you did export all your images as PNG first, but you want also to export a second time as WebP to put on your website.

If you chose RUN-WITH-LAST-VALS, it won't ask you any question this second time it will run as RUN-NONINTERACTIVE for the WebP (or any other type) because in the image's session/ID it's "marked" as already exported...
But I don't know were RUN-WITH-LAST-VALS takes the values from PNG to transfer to WebP, because they are quite different, especially the options...

Anyway, I hope this help the first timer with Script-fu to not struggle to understand that behavior, like I did

Print this item

Video Fire On The Horizon By Stick Figure - 4d Fractal Animation
Posted by: Tas_mania - 12-08-2023, 10:38 PM - Forum: Gallery - Replies (2)






I made these animations over a 6 month period with Mandelbulber and processed them with Gimp and G'MIC filters. I use filters on multiple layers from batch scripts. I heard 'Fire on the Horizon ' on this earth moving video from Idaho.

Print this item

  Nice machine from Newcastle-upon-Tyne
Posted by: Ofnuts - 12-08-2023, 09:50 PM - Forum: Watercooler - Replies (2)



Print this item

  GIMP Files stuck on PAINT XCF
Posted by: RabSmith - 12-07-2023, 09:30 PM - Forum: General questions - Replies (4)

Hya all you cute-n-cuddly GIMP users.

I have been using GIMP for about a decade and I love it, however recently after doing a clean install on my desktop PC, ALL my XCF files [previously all GIMP files] are now all PAINT XCF files and will not transfer to, or come up in, my GIMP list of 'open' files.

Try as I might, I just cannot convert my XCF files to the GIMP format I require.

It would be very useful if someone can assist me on this one, and let me access my artwork.



kind regards, Rab Smith.

Print this item

  Hi- New user 2.10.36
Posted by: theycallmejayne - 12-07-2023, 09:29 PM - Forum: General questions - Replies (5)

HI all,
I am new to GIMP.  Been a PS user but can no longer afford the way it's going so installed gimp 2.10.36 on C in a win 11 64 bit machine and GIMO portable on an external SSID on a win 10 64 bit machine, both laptops.and then

Both are set up to my preferences.     I am at the moment interested in logo creation and photo manipulation for website use

Trawled you tube and came across Davies Media Design and thought buying the masters course would be a good choice.  Turns out three quarters of the resources are missing and have been, according to the comments, for some years. DMD doesn't answer emails so somewhat disappointed.  Sorry if this is a DMD forum, if it is maybe the dude will read this and send me the missing resources.

Guess I won't be getting the Udemy Certificate from the video alone.

My current issues are:

I cant' seem to get stroking text to work.   I appreciate that its a different way of doing things but I can't get it to work to my satisfaction and its a somewhat convaluted way of doing it.  Maybe theres a plugin out there.

I also can't get text on a circle to work.  Text on the top part of the arc is fine but text on the lower places on the top right corner and i cant flip it to read upright.   However, despite copying logo by nick every step, i conclude that i must be missing something.

Does anyone know of an online teacher who someone as inexperienced as i can follow and the instructions work please?  Or is there a plug in for text on a circle?

I also now have Inkscape and I will say that as far as I am concerned it is far superior to Illustarator in ease of use.

Hopefully someone will read this and tell me where I am going wrong.

THanks for reading.

Print this item