GIMP Chat
http://gimpchat.com/

Gradient from Image
http://gimpchat.com/viewtopic.php?f=8&t=20914
Page 1 of 1

Author:  meetdilip [ Mon Jun 17, 2024 1:39 am ]
Post subject:  Gradient from Image

GIMP Version: 2.10.38
Operating System: Linux
OS Version: Ubuntu 24.04
GIMP Experience: Intermediate Level

List any relevant plug-ins or scripts:
http://gimpchat.com/viewtopic.php?f=9&t=14068

https://github.com/pixlsus/registry.gim ... g-path.scm




Hi, I am trying to add a silver gradient inside Inkscape. To do that I need to create a gradient out of image through GIMP. I have the silver texture and tried to use Rob Antonishen (scm) and trandoductin 's (.py file ) work to achieve the same. But I do not get any option to create gradient even though I added both to Home > .config and Home >.var

I am using the Flatpak version of GIMP 2.10.38.

It would be nice to know if there is any method to generate gradient from images. Thanks.

Author:  Issabella [ Mon Jun 17, 2024 2:15 am ]
Post subject:  Re: Gradient from Image

Hi meetdilip
Open an image and make a path
Tools - create a new gradient along the path
write a name for it
you will get your new gradient on your list.
I hope it helps
Here my plug-in

Attachments:
Screenshot 2024-06-17 090655.jpg
Screenshot 2024-06-17 090655.jpg [ 89.73 KiB | Viewed 434 times ]
create_new_gradient_along_path.zip [2.79 KiB]
Downloaded 18 times

Author:  meetdilip [ Mon Jun 17, 2024 2:54 am ]
Post subject:  Re: Gradient from Image

Hi, thanks.I add it to Home > .config > GIMP > 2.10 > plugins

But I do not see any options under Image or tools. Thanks.

Screencast - https://imgur.com/8nIkbGQ

Author:  rich2005 [ Mon Jun 17, 2024 3:15 am ]
Post subject:  Re: Gradient from Image

Yeah, flatpak - a real PITA

It probably depends on if you already have a regular existing Gimp 2.10 installation. This in a Mint 20 VM and a Gimp 2.10.36 flatpak. (A bit old but I can not be bothered to update, just useful for demos)

Two possibilities.
(1) The flatpak gimp_gmic_qt plugin.

Attachment:
01-flatpak.jpg
01-flatpak.jpg [ 135.41 KiB | Viewed 421 times ]


A bit strange, the new gradient appears in the old Gimp 2.10 gradients folder (2) not the .var (1) one which you might expect.

(2) RobA's script. This did not show when in either of the regular script folders .config... or .var.... I had to make a scripts folder in home (3) and add the location to the Preferences -> Folders -> Gradients scripts paths.

Attachment:
02-flatpak.jpg
02-flatpak.jpg [ 140.49 KiB | Viewed 421 times ]


It does work, beware of the dialog "popping under" the Gimp window. Refresh the gradients for a write to... the old Gimp 2.10 gradients folder again. (4)

Author:  meetdilip [ Mon Jun 17, 2024 4:19 am ]
Post subject:  Re: Gradient from Image

Hi, I get this error when trying the G'MIC option

Attachment:
Screenshot from 2024-06-17 14-45-56.png
Screenshot from 2024-06-17 14-45-56.png [ 117.79 KiB | Viewed 405 times ]


I created a folder in Home as gimp_script , then Edit > Preferences, added the folder to Script path

But neither under Image or Tools I could find the path to gradient option. I am using the latest 24.04 by the way.

Author:  meetdilip [ Mon Jun 17, 2024 4:32 am ]
Post subject:  Re: Gradient from Image

Luckily, I was able to call the script using /

When I ran it, it works but I cannot find .ggr anywhere. Neither under .config not under .var

Attachment:
Screenshot from 2024-06-17 15-00-05.png
Screenshot from 2024-06-17 15-00-05.png [ 20.22 KiB | Viewed 400 times ]


Attachment:
Screenshot from 2024-06-17 15-00-57.png
Screenshot from 2024-06-17 15-00-57.png [ 32.17 KiB | Viewed 400 times ]

Author:  rich2005 [ Mon Jun 17, 2024 4:40 am ]
Post subject:  Re: Gradient from Image

Just used the gimp_gmic_qt plugin again, this time my regular Gimp 2.10.38 and gmic 3.4 - works as expected - puts the gradient file in .config....etc Maybe try updating the gmic filters in the flatpak Gimp. Edit: or it might be the name you have given. Try something simpler, without the path.

RobA's script is registered as context. -> Right Click in the Gradients Dock, it is down at the bottom of the menu.

Obviously works for me, all depends on your setup.
--------------
FWIW a couple of videos
https://i.imgur.com/RFYUdrz.mp4 This one using gmic. I have a file manager open in both .var and .config gradient folders. Refresh the gradients to write. The file goes in .config. ...gradients here.

https://i.imgur.com/FKNYxLN.mp4 This using RobA's script. File manager shows it is my Home partition. Note that when starting the script it pops under and you need to bring it to bring it up. Same as before, refresh the gradients (or close Gimp) to write the file.

Author:  meetdilip [ Mon Jun 17, 2024 5:56 am ]
Post subject:  Re: Gradient from Image

G'MIC - I managed to run it without errors. I save to Picture > MyFolder , the whole process went without errors but nothing inside the folder, I named the file 123

Edit 1:

I found the silver.ggr under gradients. Not sure where the .ggr file is though. I searched the whole Home folder for .ggr, all it gave back was a custom.ggr file.

Author:  meetdilip [ Mon Jun 17, 2024 6:06 am ]
Post subject:  Re: Gradient from Image

Finally ! I don't know what was wrong or how it got fixed. The .config > Gradients folder is full of .ggr now :)

Attachment:
Screenshot from 2024-06-17 16-35-34.png
Screenshot from 2024-06-17 16-35-34.png [ 22.52 KiB | Viewed 378 times ]

Author:  meetdilip [ Mon Jun 17, 2024 6:10 am ]
Post subject:  Re: Gradient from Image

Awesome!!

When I called through the Gradient tab / dock ( it was not there first, I added ) the Rob A script works great.

I am so happy it worked :)

Thanks.

Author:  rich2005 [ Mon Jun 17, 2024 7:02 am ]
Post subject:  Re: Gradient from Image

meetdilip wrote:
I am so happy it worked :)


Got a result anyway ;)

Quote:
I searched the whole Home folder for .ggr, all it gave back was a custom.ggr file.


Reminded me of this from long ago.

If it's there, and you can see it, it's real. 
If it's not there, and you can see it, it's virtual. 
If it's there, and you can't see it, it's transparent. 
If it's not there, and you can't see it, you erased it. 

Author:  meetdilip [ Wed Jun 19, 2024 9:17 pm ]
Post subject:  Re: Gradient from Image

Ha ha. I guess the trick is to close GIMP and search the .config

The .ggr won't appear until then.

Author:  ofnuts [ Thu Jun 20, 2024 3:40 am ]
Post subject:  Re: Gradient from Image

meetdilip wrote:
Ha ha. I guess the trick is to close GIMP and search the .config

The .ggr won't appear until then.


In the Gradients list dialog there is a menu entry to refresh the gradients (and likewise for the Patterns, Fonts, Brushes..., the only exception being the Python plugins)

Author:  rich2005 [ Thu Jun 20, 2024 5:17 am ]
Post subject:  Re: Gradient from Image

I did mention that in an earlier post.

Same as before, refresh the gradients (or close Gimp) to write the file.

Rule number one, never read the thread from the beginning. Rule number two, see rule number one

Author:  PixLab [ Sat Jun 22, 2024 7:43 pm ]
Post subject:  Re: Gradient from Image

rich2005 wrote:
I did mention that in an earlier post. Same as before, refresh the gradients (or close Gimp) to write the file.
Rule number one, never read the thread from the beginning. Rule number two, see rule number one

:rofl :rofl
Sorry, but I could not stop laughing :mrgreen:

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/