Re: [Gimp-user] batch mode in gimp?
On Fr, Aug 02, 2013 at 03:32:55 +1200, Jehan Pagès wrote: You can do it this way. Tested by myself right now and working well: $ gimp-2.9 -i -d -f -s -b `cat script.scm` (simple-unsharp-mask \file.png\ 5.0 0.5 0) -b '(gimp-quit 0)' So basically you could have your small shell script call-gimp-function with the following code inside: -- #!/bin/sh gimp-2.9 -i -d -f -s -b `cat \$1\` $2 -b '(gimp-quit 0)' -- Then you can call it this way: $ ./call-gimp-function script.scm (simple-unsharp-mask \file.png\ 5.0 0.5 0) Thanks for your suggestion, Jehan! In fact, that's what I'm currently doing. But I thought there must be a better way, since this is very prone to quoting errors. I got hidden badly when I tried to pass a color definition as a quoted scheme list =:8O I think it should work well even if there are double quotes in the definition script because I think cat escapes them before feeding the contents to the main command. I'd rather redirect stdin instead of using cat. PS: where can I find information about how to access operating system (files, directories, environment, etc) from script-fu? I've been searching for TinyScheme ducumentation but could not find anyting. There seems to be something like txn extensions and re extensions. But they don't seem to be available from script-fu? Any hints? -- Josef Wolf j...@raven.inka.de ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
On Do, Aug 01, 2013 at 09:44:59 +0200, Ofnuts wrote: For such simple processing, you should consider using ImageMagick. Thanks for the pointer, Ofnuts! I am currently using IM. But my processing got so complicated, including various levels of quoting through muiltiple levels of schell scripts. I have a strong feeling that it is time for me to switch to a real, reliable programming language, which script-fu would be (so I hope). -- Josef Wolf j...@raven.inka.de ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
IMHO, the best candidate for these repetitive jobs is ImageMagick - as suggested before by ofnuts. Or with a shell script invoking convert (as shown in the example) or (if you have some programming experience) with a simple C program using the Magick shared library. In this way i wrote a simple program to resize images, adjusting the quality in order to generate a file not bigger than a specified limit. On Fri, Aug 2, 2013 at 10:37 AM, Josef Wolf j...@raven.inka.de wrote: On Fr, Aug 02, 2013 at 03:32:55 +1200, Jehan Pagès wrote: You can do it this way. Tested by myself right now and working well: $ gimp-2.9 -i -d -f -s -b `cat script.scm` (simple-unsharp-mask \file.png\ 5.0 0.5 0) -b '(gimp-quit 0)' So basically you could have your small shell script call-gimp-function with the following code inside: -- #!/bin/sh gimp-2.9 -i -d -f -s -b `cat \$1\` $2 -b '(gimp-quit 0)' -- Then you can call it this way: $ ./call-gimp-function script.scm (simple-unsharp-mask \file.png\ 5.0 0.5 0) Thanks for your suggestion, Jehan! In fact, that's what I'm currently doing. But I thought there must be a better way, since this is very prone to quoting errors. I got hidden badly when I tried to pass a color definition as a quoted scheme list =:8O I think it should work well even if there are double quotes in the definition script because I think cat escapes them before feeding the contents to the main command. I'd rather redirect stdin instead of using cat. PS: where can I find information about how to access operating system (files, directories, environment, etc) from script-fu? I've been searching for TinyScheme ducumentation but could not find anyting. There seems to be something like txn extensions and re extensions. But they don't seem to be available from script-fu? Any hints? -- Josef Wolf j...@raven.inka.de ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list -- (@_ | //\ | Maurizio Loreti - Fisico in pensione, nonno felice di V_/_ | due nipotini, vagabondo e fotografo a tempo perso... ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
On Fr, Aug 02, 2013 at 10:56:14 +0200, Maurizio Loreti wrote: IMHO, the best candidate for these repetitive jobs is ImageMagick - as suggested before by ofnuts. I agree with this -- as long as your operations are simple. But when your operations get more complex and involve things like like stacking, multiple layers, etc/pp, things get very complicated because the expressiveness and syntax/semantics are very limited by convert's very limited command line interface. -- Josef Wolf j...@raven.inka.de ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
On Fri, Aug 2, 2013 at 2:22 PM, Paul Cartwright pbcartwri...@gmail.comwrote: On 08/02/2013 04:56 AM, Maurizio Loreti wrote: I would be interested in a script that does resizing.. I do that on most of my images to send in email add to web pages.. Sometimes I use my Samsung Galaxy camera, other times my Nikon raw images.. I'm pretty good with shell scripts, if I have a template:) It is not a shell script, but c C++ program using the Magick++ library. You may fine the program opening the following directory on Google Documents: https://drive.google.com/folderview?id=0B1oP_87P_BIOOGRiYTU5ZTMtODI0Ni00Mzc3LTgyZjAtNzgwMTM3ZmNlM2Q4usp=sharing and entering the subdirectory photo batch resizing. GPL license; enjoy! P.S.: you will need the Magick++ shared library and the GNU getopt library; read the enclosed man page, or the README.pdf file. -- (@_ | //\ | Maurizio Loreti - Fisico in pensione, nonno felice di V_/_ | due nipotini, vagabondo e fotografo a tempo perso... ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] EXIF support in latest Gimp
I have come with the following workaround for pictures tagged as Adobe RGB which comes without an embedded profile: I apply the profile manually using imagemagick. The command boils down to this: convert _DSF2455.JPG -profile /usr/share/color/icc/colord/AdobeRGB1998.icc _DSF2455_with_profile.JPG After the profile is embedded, Firefox will display it nicely (and asks if I want to convert it to sRGB upon opening). It would still be very nice to see proper EXIF tag support to remove this additional step when working with Adobe RGB files produced by certain cameras (for example the Fujifilm X100). ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] EXIF support in latest Gimp
If your gimp is built with exif support, you should not need to do this. When I open an image with an embedded Adobe RGB, Gimp will recognize it and offer to convert to sRGB. On Fri, Aug 2, 2013 at 12:01 PM, Maxim Cournoyer maxim.courno...@gmail.comwrote: I have come with the following workaround for pictures tagged as Adobe RGB which comes without an embedded profile: I apply the profile manually using imagemagick. The command boils down to this: convert _DSF2455.JPG -profile /usr/share/color/icc/colord/AdobeRGB1998.icc _DSF2455_with_profile.JPG After the profile is embedded, Firefox will display it nicely (and asks if I want to convert it to sRGB upon opening). It would still be very nice to see proper EXIF tag support to remove this additional step when working with Adobe RGB files produced by certain cameras (for example the Fujifilm X100). ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] EXIF support in latest Gimp
When I open an image with an embedded Adobe RGB, Gimp will recognize it and offer to convert to sRGB. My camera merely tags the colorspace by setting the Interoperability Index tag to R03 (Adobe RGB) in the exif. It does _not_ embed the profile in the jpeg. Only Geeqie image viewer seems to know how to deal with this tag properly, as far as I can tell. ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
On 08/02/2013 10:47 AM, Josef Wolf wrote: On Do, Aug 01, 2013 at 09:44:59 +0200, Ofnuts wrote: For such simple processing, you should consider using ImageMagick. Thanks for the pointer, Ofnuts! I am currently using IM. But my processing got so complicated, including various levels of quoting through muiltiple levels of schell scripts. I have a strong feeling that it is time for me to switch to a real, reliable programming language, which script-fu would be (so I hope). At the risk of raising some eyebrows, better switch to python. You'll find more uses for it outside of Gimp, and inside Gimp you can do more things with it than with script-fu (like create your own dialogs...). It is also a thousand times more readable. ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
On 08/02/2013 02:22 PM, Paul Cartwright wrote: I would be interested in a script that does resizing.. I do that on most of my images to send in email add to web pages.. Sometimes I use my Samsung Galaxy camera, other times my Nikon raw images.. I'm pretty good with shell scripts, if I have a template:) http://www.imagemagick.org/Usage/files/ ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
[Gimp-user] bounds of selection outside a image
Hello, I want to crop several images in same aspect ratio. So I checked Fixed option and set proper values in tool box. And sometimes I want to complement image with background color if selection is larger than original size. I this case, I add a larger layer bottom of the image and crop it. But it would better if I can do it by one action. Therefore I'm trying to write a script-fu for it, but I'm stuck now. Because a function `gimp-selection-bounds` returns points only inside of the image even if the selection is outside of image. Is there a way to get bounds of selection outside of a image by using script-fu? -- Tetsuya Yuasa ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] bounds of selection outside a image
On 08/02/2013 04:28 AM, Tetsuya YUASA wrote: Hello, I want to crop several images in same aspect ratio. So I checked Fixed option and set proper values in tool box. And sometimes I want to complement image with background color if selection is larger than original size. I this case, I add a larger layer bottom of the image and crop it. But it would better if I can do it by one action. Therefore I'm trying to write a script-fu for it, but I'm stuck now. Because a function `gimp-selection-bounds` returns points only inside of the image even if the selection is outside of image. Is there a way to get bounds of selection outside of a image by using script-fu? -- Tetsuya Yuasa The selection is always clipped to the canvas. The selection tools may let you define an area that has parts outside of the canvas because it makes a lots of things easier, but the final result is clipped. For what you want, crop the image, and let the script figure out what to do to put the image in the proper aspect ratio (which can be a script parameter or hard-coded). ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
Re: [Gimp-user] batch mode in gimp?
On 08/03/2013 04:18 AM, Ofnuts wrote: On 08/02/2013 10:47 AM, Josef Wolf wrote: On Do, Aug 01, 2013 at 09:44:59 +0200, Ofnuts wrote: [] I have a strong feeling that it is time for me to switch to a real, reliable programming language, which script-fu would be (so I hope). At the risk of raising some eyebrows, better switch to python. You'll find more uses for it outside of Gimp, and inside Gimp you can do more things with it than with script-fu (like create your own dialogs...). It is also a thousand times more readable. +1 ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
[Gimp-user] The code for layer blending modes.
It's the first time I check GIMP's source code and I've been trying to find the file(s) where the layers blending mode formulas are coded. The GIMP version I have right now is 2.8.2 (the git version of gegl didn't compile here). I found blending modes code on these files but modifying any of them didn't affect the layers blending modes result: - app/composite/gimp-composite-generic.c - app/gegl/gimpoperationdifferencemode.c - app/gegl/gimpoperationpointlayermode.c - /gegl_020/operations/generated/difference.c (from GEGL 0.2.0 source files) What file should be modified to affect the blending modes of the layers? -- Sumdag (via www.gimpusers.com/forums) ___ gimp-user-list mailing list List address:gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list