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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,625
» Latest member: nuxttux
» Forum threads: 7,490
» Forum posts: 40,884

Full Statistics

Latest Threads
edit_paste pastes at inco...
Forum: Scripting questions
Last Post: class43
52 minutes ago
» Replies: 2
» Views: 95
CMYK color mode Gimp 2.10
Forum: Extending the GIMP
Last Post: rich2005
4 hours ago
» Replies: 20
» Views: 82,149
Open, save buttons on bot...
Forum: Gimp 2.99 & Gimp 3.0
Last Post: GrumpyDeveloper
Yesterday, 09:52 PM
» Replies: 8
» Views: 2,943
Clone size randomly chang...
Forum: General questions
Last Post: oldschool1@runbox.com
Yesterday, 05:45 PM
» Replies: 2
» Views: 180
AI Gimp Plugins
Forum: Watercooler
Last Post: Zbyma72age
Yesterday, 03:31 PM
» Replies: 20
» Views: 53,472
Gimp closes automatically
Forum: General questions
Last Post: sallyanne
Yesterday, 05:50 AM
» Replies: 2
» Views: 200
AIGoR - Artificial Image ...
Forum: Other graphics software
Last Post: vitforlinux
07-16-2025, 11:10 AM
» Replies: 12
» Views: 3,827
Is This Possible ? Print ...
Forum: General questions
Last Post: sallyanne
07-16-2025, 07:47 AM
» Replies: 4
» Views: 205
Gimp Crash
Forum: Gimp 2.99 & Gimp 3.0
Last Post: rich2005
07-16-2025, 07:16 AM
» Replies: 1
» Views: 147
producing an image
Forum: Gallery
Last Post: MJ Barmish
07-15-2025, 06:37 PM
» Replies: 0
» Views: 113

 
  Delete Layer?
Posted by: DaltonCalford - 11-29-2022, 02:46 PM - Forum: Scripting questions - Replies (2)

Hi Everyone, I have been learning script-fu but have hit a roadblock.

I have a script-fu script that works perfectly except that is will not delete a layer.

Here is the script, minus the variables so that it is easy to run in a console.
The script is written to run on an image with an image id of "1" so you may need to adjust depending upon your current environment.

 ((gimp-selection-none 1)
 (gimp-item-set-visible (car(gimp-image-get-layer-by-name 1  "background" )) 1)
 (gimp-image-set-active-layer 1 (car(gimp-image-get-layer-by-name 1  "background" )))
 (gimp-image-insert-layer 1 (car (gimp-layer-new-from-drawable (car(gimp-image-get-active-drawable  1))  1)) 0 0 )
 (gimp-image-set-active-layer 1 (car(gimp-image-get-layer-by-name 1  "background copy" )))
 (gimp-image-select-color 1 0  (car(gimp-image-get-layer-by-name 1  "1.png" )) '(0 0 0))
 (script-fu-add-bevel 1 (car(gimp-image-get-layer-by-name 1  "background copy" ))  5 0 0 )
 (script-fu-add-bevel 1 (car(gimp-image-get-layer-by-name 1  "background copy" ))  5 0 0 )
 (gimp-selection-invert 1)
 (gimp-drawable-edit-clear (car(gimp-image-get-layer-by-name 1  "background copy" )))
 (gimp-item-set-visible (car(gimp-image-get-layer-by-name 1  "background" )) 0)
 (gimp-file-save 0 1 (car(gimp-image-get-layer-by-name 1  "background copy" )) "Style_A_1.png" "Style_A_1.png")
 (gimp-item-delete (car(gimp-image-get-layer-by-name 1  "background copy" ))))

Error: Procedure execution of gimp-item-delete failed 

I have tried deleting it by the id alone in the console ie (gimp-item-delete  13589 )
with the same results.

Any examples or guidance would be appreciated.

best regards
Dalton

Print this item

  Reproduce the old behavior of "color to alpha" (GIMP 2.6)
Posted by: leiopar - 11-29-2022, 02:04 PM - Forum: General questions - Replies (7)

I use GIMP since the first version 2.

I noticed recently a change in the behavior of the "color to alpha" command from the 2.6 vertion. When I want to extract the white from a layer, the result is too pale when we put it over a white layer (which should however visually cancel the transparency effect)
See attached file : http://leiopar.free.fr/DISKETTE/gimp_cou..._alpha.zip
I asked the question here, with no results.
Please, how to reproduce the behavior of GIMP 2.6 with GIMP 2.10 ? (it is now not found in portable vertion)



Attached Files
.zip   gimp_couleur-vers_alpha[1].zip (Size: 162.99 KB / Downloads: 217)
Print this item

  Paintbrush overlay question
Posted by: michaelbr - 11-29-2022, 07:10 AM - Forum: General questions - Replies (3)

I'm trying to do something similar to this video (5:45 explains how to use overlay in paintbrush), I could follow/duplicate until paintbrush overlay, then I got lost (the paintbrush on the video is bigger than the stroke of the pen, but when passed over the pen stroke, it only enhanced the color of the stroke, not the transparent background, in my case, the brush painted over the width of the brush, not only the pen stroke), what am I missing?
ps: the opacity is set to 100% in both cases, if I tried to set mine to 10%, it won't enhance the pen strokes.

Thanks for your comment/suggestions

Print this item

  Optimise for web
Posted by: meetdilip - 11-29-2022, 12:56 AM - Forum: Watercooler - Replies (9)

What is the best image optimisation strategy for WordPress? What size and format do you use?

I am thinking of using images in webp format. Is that a good thing to do? What formats do you use for you blog without making the page heavy?

Print this item

  smart quotes WRONG/unavailable
Posted by: mcsugarfree - 11-27-2022, 03:41 PM - Forum: General questions - Replies (8)

Hi there,

I'm using a font I bought and installed in GIMP 2.10. Generally it's working fine, EXCEPT only "closing" smart quotes are displayed. At the beginning of each set of smart quotes in the text, the smart quotes point in the wrong direction! I checked the font library and the correct smart quotes are def. included in the font, it's just that GIMP doesn't seem to see them or something. See pic below. Halp?

Thanks!



Attached Files Thumbnail(s)
   
Print this item

  Script-Fu levels Newbie Gimp 2.10 Linux MX
Posted by: Anthony Buff - 11-27-2022, 08:31 AM - Forum: Scripting questions - Replies (3)

Hey there!

Newbie here trying to tackle a task above my scope of knowledge. I am trying to change the intensity of the low output levels in a batch of pdf files that are one page each. All I'm trying to do is reduce the amount of black ink used for printing as my printer doesn't have an economy mode.

I created a script in bash that splits the PDFs into separate pages for easy "layer free"/"single layer" editing and have been using bimp successfully but it'll be just great if I could accomplish this with script-fu as it would save me a ton of time.

The attached pic shows the levels setting I'd like to achieve:
[Image: HK9ZtR4.png]

I reviewed the script-fu documentation, googled for hours, watched a tutorial video, used the console and the procedure browser rendered this:

Code:
(gimp-drawable-levels drawable channel low-input high-input clamp-input gamma low-output high-output clamp-output).

Yet I was unable to find working examples online and couldn't replace the variables with their expected values. Since the files have only one layer, Could "Drawable" be "TheCurrentLoadedImage"? (whatever the correct syntax should be to refer to it).

I'd be truly grateful just to see a working example that could run in the console or even better in a bash script that could accomplish such simple task.

Thanks in advance!!!

Print this item

  Imported template size problems
Posted by: Boney Tony - 11-26-2022, 06:41 PM - Forum: Older Gimp versions (2.8, 2.6....) - Replies (2)

Hi,
I've imported PDF templates from (now a selection) of websites then used them to create artwork for a CD booklet, disc and tray card.
The process involves creating the image within the border lines on the template, then flattening the image without the template.
The problem I'm having is that when the artwork is submitted and placed over the same template at the printers end the artwork is now way too small.
In GIMP I have measured the templates against the ruler bars and all is correct. 
Can GIMP be reducing the templates? And if so how come the ruler measurements look ok?
Frustratingly, the tray card template hasn't presented any problems it's just the booklet and disc templates.

Print this item

  So i dont recall things like this so then Adding some vector graphical functionality
Posted by: mzoltan32 - 11-25-2022, 08:49 PM - Forum: Extending the GIMP - Replies (13)

Hi! This is my first post here. I would like to add some vectorgraphical functionalities to gimp (according to my memory its not quite present)
So that i would be able to draw straight lines and then add all these vector lines to the selection (or remove some as an optional things or add others again which were removed or so forth)
So that i could have a subdivide sort of functionality to make a curved line out of these straight linesegments joined. (if the straight line segments weren't joined there should have also a checkbox i would like to add which joins the lines and another wich forms a complete loop.. also working well with concave shapes.

I would like the vectorgraphic lines to blend with the background in forming the line (so that some pixels are more dim but this dimness colour is according to the solid background colour on top of which it was drawn. then have layers like this.

That is all!

is it possible? if so through what? perhaps exclusively through C++ plugins.

Print this item

  Script Fu process questions.
Posted by: DaltonCalford - 11-25-2022, 08:10 PM - Forum: Scripting questions - Replies (1)

I am trying to automate a simple process, but, I am new to script-fu and trying to get my bearings.
I am going to describe what I am trying to do, where I am failing, and perhaps find an example to what I am trying to do.

The Task
I have an image (myimage.xcf) which has a background layer (256 by 256, RGB, background transparancy)
as well as 200 "mask" layers 

The background image is a texture (think carpet or steel image)

The mask layers have two colors - black and white 


The Process
This script need to run against the currently selected image, non-interactively

For each of the mask layers (named mask1, mask2 etc)
 The script will make a copy of the background layer called "current work"
  Using the current mask, it will select by color (black) switch to the "current work" layer and apply the script-fu-add-bevel 
  The script will then go back to the current mask layer and select by color(white), switch to the "current work" layer and delete the selection 
  The script will then export the "current work" to a png file, delete the "current work" layer and repeat the process for the next mask layer.

The Problem

The thing is, while I know I can refer to layers by number, how do I find a layers ID by name ie
While I can use  (gimp-image-get-active-drawable 1) to get the layer number for the currently selected layer, how do I get the layer number for the layer named "background"?
I can set a layer manually at position 0, but, I can't find instructions on how to switch layers based upon position or to switch layers based upon name.

I wish there was a "recorder" process that just created a script that repeated what the user was doing like a macro, but, I can not find such a thing and it is beyond my ability to write it.

Any guidance on how to associate a layer(items) number based upon it's name or it's position in the layer list, would be appreciated.

Thanks in advance

Print this item

  Change 2 colours to 2 different colours
Posted by: KS_ - 11-25-2022, 03:02 PM - Forum: General questions - Replies (5)

Hello to all,

I need to do the following in GIMP but as fast as possible... as I have to make this change in 900 other files.

Attached photo: Photo
I want the dark red colour to be black and the light red colour to be white and in this way I want to convert it to PNG format... 

If I do it myself, with the pencil I have to click pixel by pixel... is there any way to change the colour faster... because to use it in the machine I need... it only allows black and white PNG.

Thanks!

Print this item