Error on the bash command line
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Error on the bash command line
Hello,
I am running openSUSE 11.4, GIMP 2.6.11 and bash 4.1.10
On my openSUSE 11.3 the following worked:
gimp -i -b --verbose '(batch-slide "file.jpg" "FileName" "23")' -b '(gimp-quit 0)'
Now I get the following error: GIMP-Error: Opening '/home/houghi/tmp/gimp/test/(batch-slide "file.jpg" "FileName" "23")' failed: No such file or directory
I have this also with other things, like `gimp -i -b --verbose \ "(batch_fuzzy_border \"$FILE\" '$COLOR 30 FALSE 4.5 TRUE 75 )" -b \ "(gimp-quit 0)"`
Clearly it sees the whole as a file, instead of precessing it. Adding --batch-interpreter plug-in-script-fu-eval to it does not change anything.
All are standard things already included in GIMP, so no self made script-fu things where I could have made a mistake.
My question is: what am I doing wrong?
houghi
Error on the bash command line
On 04/03/2011 11:25 AM, houghi wrote:
-b --verbose
Shouldn't that be --verbose -b?
Error on the bash command line
On Sun, Apr 03, 2011 at 01:05:53PM +0200, Ofnuts wrote:
On 04/03/2011 11:25 AM, houghi wrote:
-b --verbose
Shouldn't that be --verbose -b?
D'oh!
I added it as nothing happend and only linited errors where given. There
still is something not right:
batch command experienced an execution error
That is the reason I added the verbose part.
Here the complete output:
houghi@penne : gimp --verbose -i -b "(fuzzy_border file.jpg '(0 0 0) 50 0 16 FALSE 1 FALSE)" -b '(gimp-quit 0)'
INIT: gimp_load_config
Parsing '/home/houghi/.gimp-2.6/unitrc'
Parsing '/etc/gimp/2.0/gimprc'
Parsing '/home/houghi/.gimp-2.6/gimprc'
gimp_composite: use=yes, verbose=no
Processor instruction sets: +mmx +sse +sse2 -3dnow -altivec -vis
INIT: gimp_initialize
INIT: gimp_real_initialize
INIT: gimp_restore
Parsing '/home/houghi/.gimp-2.6/parasiterc'
Loading 'brush factory' data
Loading 'pattern factory' data
Loading 'palette factory' data
Loading 'gradient factory' data
Loading fonts
Parsing '/home/houghi/.gimp-2.6/templaterc'
INIT: gimp_real_restore
Parsing '/home/houghi/.gimp-2.6/pluginrc'
Starting extension: 'extension-script-fu'
No batch interpreter specified, using the default 'plug-in-script-fu-eval'.
batch command experienced an execution error
EXIT: gimp_exit
EXIT: gimp_real_exit
Terminating plug-in: '/usr/lib64/gimp/2.0/plug-ins/script-fu'
Terminating plug-in: '/usr/lib64/gimp/2.0/plug-ins/script-fu'
Writing '/home/houghi/.gimp-2.6/templaterc'
Writing '/home/houghi/.gimp-2.6/parasiterc'
Writing '/home/houghi/.gimp-2.6/unitrc'
EXIT: batch_exit_after_callback
As I said, it used to work before, so I must be doing something wrong that (by chance?) did work before.
houghi
This is written under the inluence of the following: > Artist : Blue Öyster Cult > Song : Workshop Of The Telescopes > Album : Blue Öyster Cult _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Error on the bash command line
On Sun, Apr 03, 2011 at 01:33:32PM +0200, houghi wrote:
On Sun, Apr 03, 2011 at 01:05:53PM +0200, Ofnuts wrote:
On 04/03/2011 11:25 AM, houghi wrote:
-b --verbose
Shouldn't that be --verbose -b?
D'oh!
I added it as nothing happend and only linited errors where given. There still is something not right:
batch command experienced an execution errorThat is the reason I added the verbose part.
Here the complete output:
I am still looking for a solution. :-( I looked at http://www.gimp.org/tutorials/Basic_Batch/ and that worked. So it must be something to do with either the parameters or the way I place them on the command line.
I looked at /usr/share/gimp/2.0/scripts/fuzzyborder.scm and there I saw: (define (script-fu-fuzzy-border inImage inLayer inColor inSize inBlur inGranu inShadow inShadWeight inCopy inFlatten )
The command and output is:
houghi@penne : gimp --verbose --batch-interpreter plug-in-script-fu-eval -i -b "(script-fu-fuzzy-border \"file.jpg\" '(0 0 0) 50 0 16 FALSE 1 FALSE)" -b '(gimp-quit 0)'
INIT: gimp_load_config
Parsing '/home/houghi/.gimp-2.6/unitrc'
Parsing '/etc/gimp/2.0/gimprc'
Parsing '/home/houghi/.gimp-2.6/gimprc'
gimp_composite: use=yes, verbose=no
Processor instruction sets: +mmx +sse +sse2 -3dnow -altivec -vis
INIT: gimp_initialize
INIT: gimp_real_initialize
INIT: gimp_restore
Parsing '/home/houghi/.gimp-2.6/parasiterc'
Loading 'brush factory' data
Loading 'pattern factory' data
Loading 'palette factory' data
Loading 'gradient factory' data
Loading fonts
Parsing '/home/houghi/.gimp-2.6/templaterc'
INIT: gimp_real_restore
Parsing '/home/houghi/.gimp-2.6/pluginrc'
Starting extension: 'extension-script-fu'
batch command experienced an execution error
EXIT: gimp_exit
EXIT: gimp_real_exit
Terminating plug-in: '/usr/lib64/gimp/2.0/plug-ins/script-fu'
Terminating plug-in: '/usr/lib64/gimp/2.0/plug-ins/script-fu'
Writing '/home/houghi/.gimp-2.6/templaterc'
Writing '/home/houghi/.gimp-2.6/parasiterc'
Writing '/home/houghi/.gimp-2.6/unitrc'
EXIT: batch_exit_after_callback
Again all google searches I tried either point me to making my own script-fu, which do not need, as I use existing ones or people asking the same question, without an answer.
Please, please help me.
houghi
- postings
- 16
Error on the bash command line
Again all google searches I tried either point me to making my own script-fu, which do not need, as I use existing ones or people asking the same question, without an answer.
Please, please help me.
houghi
Perhaps you could have checked back on Gimp Talk where you cross-posted this question: http://www.gimptalk.com/index.php?/topic/49810-script-error-on-the-prompt-line/page__pid__379040#entry379040
As I answered it there!
Error on the bash command line
On Wed, Apr 06, 2011 at 10:30:25PM +0200, paynekj wrote:
Perhaps you could have checked back on Gimp Talk where you cross-posted this question: http://www.gimptalk.com/index.php?/topic/49810-script-error-on-the-prompt-line/page__pid__379040#entry379040
As I answered it there!
I do appoligize. I will take it up there.
houghi
Error on the bash command line
On 04/06/2011 12:09 PM, houghi wrote:
...elision by patrick...
I am still looking for a solution. :-( I looked at http://www.gimp.org/tutorials/Basic_Batch/ and that worked. So it must be something to do with either the parameters or the way I place them on the command line.I looked at /usr/share/gimp/2.0/scripts/fuzzyborder.scm and there I saw: (define (script-fu-fuzzy-border inImage inLayer inColor inSize inBlur inGranu inShadow inShadWeight inCopy inFlatten )
The command and output is: houghi@penne : gimp --verbose --batch-interpreter plug-in-script-fu-eval -i -b "(script-fu-fuzzy-border \"file.jpg\" '(0 0 0) 50 0 16 FALSE 1 FALSE)" -b '(gimp-quit 0)'
This command:
gimp -i -c -d -b '(batch_fuzzy_border "./alyssa01.jpg" "pink" 40 TRUE 10 TRUE 50) ' -b '(gimp-quit 0)'
just worked for me with the attached versions of batchfuzzy.scm and fuzzyborder.scm using GNU Image Manipulation Program version 2.7.2. I made some changes here and there to fix errors in the scripts and to get rid of calling deprecated methods. This may make it not work on earlier versions. YMMV. I'm sorry that no one bothered to look at the problem and led you on wild goose chases. This group is usually more helpful than that.
Patrick
Error on the bash command line
On Wed, Apr 06, 2011 at 06:15:52PM -0700, Patrick Horgan wrote:
gimp -i -c -d -b '(batch_fuzzy_border "./alyssa01.jpg" "pink" 40 TRUE 10 TRUE 50) ' -b '(gimp-quit 0)'
just worked for me with the attached versions of batchfuzzy.scm and fuzzyborder.scm using GNU Image Manipulation Program version 2.7.2.
Just tried it and it works in 2.6.11 as well.
I
made some changes here and there to fix errors in the scripts and to get rid of calling deprecated methods.
As these were scripts that were provided by my distro, I assume they are somewhat 'standard' for GIMP. To know there are errors in it, is perhaps more importand to solve then me getting errors. Perhaps a good time to overhaul all the ones that come standard with GIMP.
As it was coming with GIMP the last thing I was thinking about was problems with the script.
This may make it not work on earlier versions. YMMV. I'm sorry that no one bothered to look at the problem and led you on wild goose chases. This group is usually more helpful than that.
And I also should have looked at the group where I posted it as well. Will get the solution to there as well.
I should add that if it doesn't work on your version, you can ask and I'll get it working on whatever version you have. You might have fun browsing the procedures yourself in the script-fu console. If you need help figuring that out, let me know. Where I put ./alyssa01.jpg you could also put "./*.jpg" if you would rather batch process a lot of files at once with the same arguments.
As I now have a starting point, I can start looking for solutions and also see what I can do to get others working. Ones I have tried and had problems with are batch-slide and batch-drop-shadow, but there will be others as well.
For the next two weeks I won't have much time, so it could take a while before I can give feedback about this.
houghi
Listen do you hear them drawing near in their search for the sinners? Feeding on the power of our fear and the evil within us. Incarnation of Satan's creation of all that we dread. When the demons arrive those alive would be better off dead! _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Error on the bash command line
On 04/06/2011 10:51 PM, houghi wrote:
... elision by patrick ...
As these were scripts that were provided by my distro, I assume they are somewhat 'standard' for GIMP. To know there are errors in it, is perhaps more importand to solve then me getting errors. Perhaps a good time to overhaul all the ones that come standard with GIMP.
I opened a bug and attached a patch to fix the minor problems in fuzzyborder.scm.
https://bugzilla.gnome.org/show_bug.cgi?id=646993
Patrick
Error on the bash command line
houghi wrote:
As these were scripts that were provided by my distro, I assume they are somewhat 'standard' for GIMP. To know there are errors in it, is perhaps more importand to solve then me getting errors. Perhaps a good time to overhaul all the ones that come standard with GIMP.
GIMP 2.7 is a development release and it has a large number of changes in the PDB API. It is the biggest PDB change in a while and, with the moving of some procedure parameters to context settings, most scripts are or might be affected.
There are a number of outstanding patches I am reviewing for Script-Fu scripts to address a lot of the changes. With a high percentage of the 100 Script-Fu scripts requiring some changes you can expect some issues with Script-Fu scripts for a while. I am planning to have all the scripts updated for the 2.8 release.
Error on the bash command line
On Thu, Apr 07, 2011 at 12:31:44AM -0700, Patrick Horgan wrote:
I opened a bug and attached a patch to fix the minor problems in fuzzyborder.scm.
Thanks.
houghi
Can't read file header
Dear Folks!
My problem is not strictly related to Gimp, but I hope that Gimp can
help me solve it and
I am sure that there are a lot of clever people on this list who can
help me understand what is happening here.
I have appr. 100 pictures selected from the thousands taken of my
wedding. I would like to send them to a
printer company, but the software they give cannot use them because of
the failure that prevents IrfanView
from opening them too. The funny is that all the other picture viewers
can open these pictures, including
Gimp.
I tried to open a picture with gimp, then save it in different formats, but they behave the same: IrfanView cannot open them. I tried jpg with and without exif data, png, tif and xcf. The funny is that if I try to open it from inside gimp by file>open or by drag-and-drop, it opens it without problem, but if I try to open it from the file manager, it gives an error message: Opening 'C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25 Esküvo\p0023.jpg' failed: Could not open 'C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25 Esküvo\p0023.jpg' for reading: No such file or directory
One of the images is here: https://picasaweb.google.com/lh/photo/QVOculUehRDqAywlBYIwwQ?feat=directlink
What is the problem with these pics and how can I eliminate it?
Thanks: Abel
ps. I am on Windose XP SP3
Can't read file header
I see no metadata (EXIF or IPTC) in the image provided.
I did notice that XP flags it as "blocked" http://www.tomshardware.com/forum/53691-45-this-file-computer-blocked
so that could be the issue?
-Rob A>
On Fri, Apr 8, 2011 at 11:00 AM, Tőkés Ábel wrote:
Dear Folks!
My problem is not strictly related to Gimp, but I hope that Gimp can help me solve it and
I am sure that there are a lot of clever people on this list who can help me understand what is happening here.I have appr. 100 pictures selected from the thousands taken of my wedding. I would like to send them to a printer company, but the software they give cannot use them because of the failure that prevents IrfanView
from opening them too. The funny is that all the other picture viewers can open these pictures, including
Gimp.I tried to open a picture with gimp, then save it in different formats, but they behave the same: IrfanView cannot open them. I tried jpg with and without exif data, png, tif and xcf. The funny is that if I try to open it from inside gimp by file>open or by drag-and-drop, it opens it without problem, but if I try to open it from the file manager, it gives an error message: Opening 'C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25 Esküvo\p0023.jpg' failed: Could not open 'C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25 Esküvo\p0023.jpg' for reading: No such file or directory
One of the images is here: https://picasaweb.google.com/lh/photo/QVOculUehRDqAywlBYIwwQ?feat=directlink
What is the problem with these pics and how can I eliminate it?
Thanks: Abel
ps. I am on Windose XP SP3 _______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Can't read file header
Tőkés Ábel wrote,
Dear Folks!
My problem is not strictly related to Gimp, but I hope that Gimp can help me solve it and
I am sure that there are a lot of clever people on this list who can help me understand what is happening here.I have appr. 100 pictures selected from the thousands taken of my wedding. I would like to send them to a printer company, but the software they give cannot use them because of the failure that prevents IrfanView
from opening them too. The funny is that all the other picture viewers can open these pictures, including
Gimp.I tried to open a picture with gimp, then save it in different formats, but they behave the same: IrfanView cannot open them. I tried jpg with and without exif data, png, tif and xcf. The funny is that if I try to open it from inside gimp by file>open or by drag-and-drop, it opens it without problem, but if I try to open it from the file manager, it gives an error message: Opening 'C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25 Esküvo\p0023.jpg' failed: Could not open 'C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25 Esküvo\p0023.jpg' for reading: No such file or directory
One of the images is here: https://picasaweb.google.com/lh/photo/QVOculUehRDqAywlBYIwwQ?feat=directlink
What is the problem with these pics and how can I eliminate it?
I had no problem with that image displaying in IrfanView, GIMP or Windows Picture Viewer.
I suspect it may not be a problem with the image itself. What is the associated program that File Manager is trying to open it with? Is the file already open? Is it read-only? Are you able to copy the image to a directory other than "C:\Documents and Settings\Ábel\My Documents\My Pictures\2009-04-25\Esküvo\" and open it from there?
Can't read file header - solved
Hi all,
Thank you for your guesses and intention to help. The cause of the failure is the same banal one that I ran into a couple of years ago - the name of the directory.
I am so misfortunate that my user account was created originally with
the hungarian special character Á.
Moreover, this folder included the characters ü and ő. For God knows
why, windoze allows creating directories
using these, however a lot of applications cannot handle them properly.
This is the case now.
I just simply copied the pictures to a folder that's path uses only standard ascii characters - and it works!
Ábel
Error on the bash command line
On Wed, Apr 06, 2011 at 06:15:52PM -0700, Patrick Horgan wrote:
The command and output is:
houghi@penne : gimp --verbose --batch-interpreter plug-in-script-fu-eval -i -b "(script-fu-fuzzy-border \"file.jpg\" '(0 0 0) 50 0 16 FALSE 1 FALSE)" -b '(gimp-quit 0)'This command:
gimp -i -c -d -b '(batch_fuzzy_border "./alyssa01.jpg" "pink" 40 TRUE 10 TRUE 50) ' -b '(gimp-quit 0)'
just worked for me with the attached versions of batchfuzzy.scm and fuzzyborder.scm using GNU Image Manipulation Program version 2.7.2. I made some changes here and there to fix errors in the scripts and to get rid of calling deprecated methods. This may make it not work on earlier versions. YMMV. I'm sorry that no one bothered to look at the problem and led you on wild goose chases. This group is usually more helpful than that.
I should add that if it doesn't work on your version, you can ask and I'll get it working on whatever version you have. You might have fun browsing the procedures yourself in the script-fu console. If you need help figuring that out, let me know. Where I put ./alyssa01.jpg you could also put "./*.jpg" if you would rather batch process a lot of files at once with the same arguments.
I have the fuzzyborder working, but unfortunatly only by copy and pasting. I have looked at the code and have absolutely no idea on how to get it working for slide.scm or drop-shadow.scm
I understand that I need to write some sort of batch or something else to use them, but all I do is stare at a lot of code and have no idea on how to commence, regardless of the many websites I read. http://www.gimp.org/docs/scheme_plugin/ is just one of them.
Or do I understand wrongly and there is a (secret) way to directly adress the scm files from the command line?
houghi
This is written under the inluence of the following: > Artist : Mercedes Sosa > Song : Doña Ubensa > Album : Como un pájaro libre _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Error on the bash command line
On Tue, Apr 19, 2011 at 02:00:11AM -0700, Patrick Horgan wrote:
I assume from your previous emails that you understand fuzzyborder and its arguments.
I do. At least I understand the arguments
Unfortunately, it's written to work with an image in gimp, not a file on the harddisk.
OK. Suddenly things are much more logical.
If you have other scripts you want to run that expect and image or layer, you will have to write a wrapper script similar to this one. Any differences will come from the arguments that the script expects. You'll have to accept all the arguments that the user will specify, along with a filename or fileglob, open the file, and then pass all the right arguments from the wrapper to the script you want to call. If you get stuck, just tell me another script you want to wrap like this and I'll write a little tutorial.
OK. Thanks. Due to being busy (great weather in Belgium, so a beer is in order) I will be looking at all of this in more detail at a later date. It is a pity that documentation about this is pretty hard to find (at least I was not able to find it) and should have a more promenet place in the GIMP documentation, but then that is just my opinion. I can understand if I am only one of the few who wants to processing many images at the same time AND is basically a script kiddie.
I will see how far I get to do the same, with the explanation above, for slide.scm and drop-shadow.scm and will post both failure and success here most likely next week.
If you have more questions, please ask. I don't know what you don't understand if you don't ask:)
I am very well aware of that. It is also hard to ask when you don't understand what you are asking. ;-) I hate questions like "It doesn't work!" and I hate myself for coming across like that.
Already I owe you a beer (or something else if you do not want beer) for the efford you have put into this.
houghi
> Knock-knock. > Who's there? > Under the Patriot Act, we don't have to tell you that. _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Error on the bash command line
On Tue, Apr 19, 2011 at 06:14:39PM +0200, houghi wrote:
I am very well aware of that. It is also hard to ask when you don't understand what you are asking. ;-) I hate questions like "It doesn't work!" and I hate myself for coming across like that.
OK. Status update:
Things work, but not due to me. Basically I kept on searching and found
scripts from others. I am able to read them and sometimes even edit them.
I am still unable to make my own.
Here my thoughts on how I think the process is going:
From the command line:
gimp -i -c -d -b '(batch_fuzzy_border "./alyssa01.jpg" "pink" 40 TRUE 10 TRUE 50) ' -b '(gimp-quit 0)'
This is read by the script with (define (batch_fuzzy_border pattern color size blurt gran shadowt shadowp)
This then is passed on to the "real" script with script-fu-fuzzy-border image drawable color size blurt gran shadowt shadowp FALSE TRUE)
All the rest is to open andf close the file(s).
This all works, so I try to implement this for script-fu-drop-shadow where I want to use the standard settings for all. In scrpt-fu console I get the following: (script-fu-drop-shadow run-mode image drawable value value value color value toggle)
As I only want to change the name, I get the following:
(define (batch_drop_shadow pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
)
(script-fu-drop-shadow image drawable 8 8 15 "black" 80.0 TRUE)
(set! drawable (car (gimp-image-get-active-layer image)))
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)
)
(set! filelist (cdr filelist))
)
)
)
The command I use is:
gimp --verbose -i -c -d -b '(batch_drop_shadow "file.png" )' -b '(gimp-quit 0)'
This results in: Starting extension: 'extension-script-fu' No batch interpreter specified, using the default 'plug-in-script-fu-eval'. batch command executed successfully.
The result is however not a dropshadow, although something is done, as the size is different before and after. With all the time I spend on this, it must be me that is unable to grasp how things are done and perhaps better just ask when O need a script.
The end goal is to be able to do this for all of the scripts that are either included or downloaded at a later time. I am afraid this will be not for me. :-/
houghi
Theologians can pursuade themselves of anything. Anyone who can worship a trinity and insists that his religion is a monotheism can believe anything -- just give him time to rationalize it. Robert A. Heinlein, JOB: A Comedy of Justice _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
- postings
- 16
Error on the bash command line
I think that what you've done is fine up to a point.
When the drop-shadow is created, it's put onto it's own layer, so your image now has two layers, BUT when you then set the drawable to the active layer: (set! drawable (car (gimp-image-get-active-layer image)))
and save that layer ONLY:
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
you are only saving the original image/layer, resized to allow for the drop shadow.
I think you need to merge the layers before you set the drawable to the active layer:
(set! drawable (car (gimp-image-merge-visible-layers image CLIP-TO-IMAGE)))