It is currently Mon Apr 15, 2024 8:26 am


All times are UTC - 5 hours [ DST ]


Switch to mobile style

Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Sun Nov 17, 2013 2:53 pm  (#21) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
If you are using GNOME then the default terminal is called GNOME Terminal. It should be available in your application menus.

Whatever application you'd use to run 'su -' just use that. But you don't have to type 'su -'. Instead type the three commands in my previous message. (The first command downloads the file from my website, the second makes it executable, and the third executes it.)

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Sun Nov 17, 2013 2:57 pm  (#22) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I do have that terminal in my Cairo-dock but I don't think I use chmod command in Fedora. I am still very green on Linux commands. :oops:

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 6:12 am  (#23) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
@saul, Here is what I did but I don't know what to do next.

Image

and I don't know where to put this script...

Image

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 6:26 am  (#24) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
molly wrote:
@saul, Here is what I did but I don't know what to do next.

If you hit RETURN then the script should execute. You will likely get a warning about a missing tag cache but you can ignore that. After a while, the script should finish and the dollar prompt appear (indicating that your computer is ready for the next command). At this point, you could type in the command 'gimp example.xcf' to open the generated file in GIMP.

molly wrote:
and I don't know where to put this script...

You could put the script in /usr/local/bin (you will need to do this as root). If you do this then to use the command you would not need the leading ./

preview-gradients.sh Atmospheric/ example.xcf

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 6:46 am  (#25) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I get this when I hit enter...
[molly@localhost ~]$ chmod +x preview-gradients.sh
[molly@localhost ~]$ ./preview-gradients.sh Atmospheric/ example.xcf
cp: cannot stat ‘Atmospheric//*.ggr’: No such file or directory
Failed to parse tag cache: No such file or directory
[molly@localhost ~]$

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 6:54 am  (#26) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
molly wrote:
cp: cannot stat ‘Atmospheric//*.ggr’: No such file or directory

You need to provide the full location of the 'Atmospheric' directory. For example, if it is in your 'Desktop' folder then your command should be:

preview-gradients.sh Desktop/Atmospheric example.xcf

If you're not sure where you put the 'Atmospheric' folder, you can use the 'find' command to tell you where it is:

find -name Atmospheric

EDIT: Also make sure that you've unzipped the file containing the .ggr files.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:01 am  (#27) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
These .ggr files are in a folder called Atmospheric on my desktop. This is what I get now...
2013-11-18 06:58:50 (5.91 MB/s) - ‘preview-gradients.sh.5’ saved [4067/4067]

[molly@localhost ~]$ chmod +x preview-gradients.sh
[molly@localhost ~]$ ./preview-gradients.sh Desktop/Atmospheric/ example.xcf
Failed to parse tag cache: No such file or directory

Image

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:07 am  (#28) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
That looks good (the tag cache error is expected). You just have to wait a while for GIMP to finish creating the previews (it may take a couple of minutes if you have lots of them). Once it is done, you should have a new file name /home/molly/example.xcf

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:10 am  (#29) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
What about this error that comes up when I hit enter. now it is just sitting there...
Failed to parse tag cache: No such file or directory
I made a screen shot in the above post of the folder and contents on the desktop.

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:14 am  (#30) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
molly wrote:
What about this error that comes up when I hit enter. now it is just sitting there...
Failed to parse tag cache: No such file or directory

That should not cause any problems since GIMP is not using tags for this operation.

How many gradients are in your Atmospheric folder? (The script takes about two or three seconds per each gradient.)

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:15 am  (#31) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
I made a new folder on the desktop. I called it Atmospheric2. I copied 5 of the gradients from the Atmospheric folder in this and ran the terminal again.
I don't know how to tell if it is doing anything cuz, I went and made my bed, got shower, came back and it is still sitting there. I must have screwed something up. :oops:
[molly@localhost ~]$  wget kerosenecow.net/data/GIMP/preview-gradients.sh
--2013-11-18 07:31:52--  http://kerosenecow.net/data/GIMP/preview-gradients.sh
Resolving kerosenecow.net (kerosenecow.net)... 208.94.116.204
Connecting to kerosenecow.net (kerosenecow.net)|208.94.116.204|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.kerosenecow.net/data/GIMP/preview-gradients.sh [following]
--2013-11-18 07:31:52--  http://www.kerosenecow.net/data/GIMP/preview-gradients.sh
Resolving www.kerosenecow.net (www.kerosenecow.net)... 208.94.116.110, 208.94.116.138, 208.94.117.77
Connecting to www.kerosenecow.net (www.kerosenecow.net)|208.94.116.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4067 (4.0K) [application/x-sh]
Saving to: ‘preview-gradients.sh.8’

100%[======================================>] 4,067       --.-K/s   in 0.001s 

2013-11-18 07:31:52 (4.24 MB/s) - ‘preview-gradients.sh.8’ saved [4067/4067]

[molly@localhost ~]$     chmod +x preview-gradients.sh
[molly@localhost ~]$     ./preview-gradients.sh Desktop/Atmospheric2/ example.xcfFailed to parse tag cache: No such file or directory
[molly@localhost ~]$

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:41 am  (#32) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
It looks as though things worked fine. You should now have a file name 'example.xcf' in your home folder.

What is the output of running the following:

ls -l ~/example.xcf

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:46 am  (#33) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
/home/molly/example.xcf
[molly@localhost ~]$ woo hoo, it is there,
/thank you so much Saul. I was still waiting for it to do something but it never came and said, hey, look in your home folder dummy. This is very cool.

:oops: :oops: :coolthup
Image

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:50 am  (#34) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Cool. :bigthup


We'll make a neck-bearded system guru out of you yet. ;)

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 7:55 am  (#35) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
That will take a lot of hair pulling and patience I am afraid. I posted the results above.

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 1:30 pm  (#36) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
looks really cool, now make it for Linux... :teeth, best little program out there, even if it is for windoze.

_________________
Image


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 2:00 pm  (#37) 
Offline
GimpChat Member

Joined: Nov 16, 2013
Posts: 10
Mikechat wrote:
Hi Molly
sorry this is not for you but for
windows guys, maybe someone will find this useful,
I like to keep programs together as well so for Windows
I added a directory to gimp user\plug-ins\Gradient_From_Image
I put the single execute file ChangeImage.exe in that directory
then I made a shell to it, put that in my user\plug-ins directory.
Plugin ChangeImage to Gradient
set it to show in Filters menu
works
Python code to ChangeImage to Gradient below
#!/usr/bin/env python
#


from gimpfu import *
import shlex
import subprocess
import os, sys

def plugin_main(img, drawable):
  command = "\"O:\\PortableApps\\gimp-2.8\\.gimp-2.8\\plug-ins\\Gradient_From_Image\\ChangeImage.exe\" \"" + "\"" #<<--EDIT THIS<<--(Directory, where you place program.exe file)
  args = shlex.split(command)
  child = subprocess.Popen(args, shell=False)

register(
        "python_fu_PluginChangeImage",
        "Plugin ChangeImage to Gradient",
        "ChangeImage",
        "S J Bush",
        "S J Bush",
        "2011",
        "<Image>/Filters/Plugin _ChangeImage to Gradient",
        "*",
        [],
        [],
        plugin_main,
        )

main()

note
in command = line above, you have to change to your user\plug-ins path.
it has to look the same just with your system's paths.


mikechat, can you upload this plug-in? Doesn't show on menu Filter, i think that there is an error on code, or is incompatible with gimp 2.8.8 (windows) otherwise is a problem of my copy and paste on notepad++.
:tyspin


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 5:02 pm  (#38) 
Offline
GimpChat Member

Joined: May 23, 2012
Posts: 150
examine the command line if it has any blank spaces in
it, it won't work.


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 5:13 pm  (#39) 
Offline
GimpChat Member

Joined: May 23, 2012
Posts: 150
Python code to ChangeImage to Gradient below
#!/usr/bin/env python
#


from gimpfu import *
import shlex
import subprocess
import os, sys

def plugin_main(img, drawable):
command = "\"O:\\PortableApps\\gimp-2.8.8\\.gimp-2.8\\plug-ins\\Gradient_From_Image\\ChangeImage.exe\" \"" + "\"" #<<--EDIT THIS<<--(Directory, where you place program.exe file)
args = shlex.split(command)
child = subprocess.Popen(args, shell=False)

register(
"python_fu_PluginChangeImage",
"Plugin ChangeImage to Gradient",
"ChangeImage",
"S J Bush",
"S J Bush",
"2011",
"<Image>/Filters/Plugin _ChangeImage to Gradient",
"*",
[],
[],
plugin_main,
)

main()

note
I just changed a number, I did not test but it should work


Top
 Post subject: Re: Is there a script for looking at Gradients
PostPosted: Mon Nov 18, 2013 5:50 pm  (#40) 
Offline
GimpChat Member

Joined: Nov 16, 2013
Posts: 10
@mikechat, doesn't work :gaah
in menu Filters there isn't Plugin _ChangeImage to Gradient


Top
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) two gradients two photos

7

No new posts Attachment(s) Problem with gradients

5

No new posts Attachment(s) How to create custom gradients?

5

No new posts Attachment(s) | Solved ] Move points on gradients

2

No new posts Editing Gradients Stopped Working Overnight (Solved)

2



* Login  



Powered by phpBB3 © phpBB Group