Question about scripting
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.
Question about scripting | Kent Tenney | 12 Jul 15:43 |
Question about scripting | saulgoode@brickfilms.com | 12 Jul 16:25 |
Question about scripting | Kent Tenney | 13 Jul 15:56 |
Question about scripting | Carol Spears | 12 Jul 18:30 |
Question about scripting | Sven Neumann | 12 Jul 18:33 |
Question about scripting | Kent Tenney | 13 Jul 15:47 |
Question about scripting | Sven Neumann | 15 Jul 17:39 |
Question about scripting
Howdy,
I am interested in implementing a workflow capability to Gimp based on the following principles;
- the original file is immutable. (any edits of it lose information)
- the destination file is immutable. (assuming that lossy compression is used, (usually the case))
This implies that that handling digital images should involve
'recipes' or 'routes' which
describe how to create a destination image from a source.
A destination image is associated with data which defined the source image, and editing parameters which resulted in this image.
Now, if when 'resize' the destination image, I create a new destination image from the source, applying the same color, cropping, and sharpening transforms, resampling to a different size.
A good start in this direction would be if I could automatically save curves and levels files when applying these edits. I could then script associating the color transforms with the image.
Questions: Is it possible to script this capability? (automatically saving the curves and levels files, under names which indicates which image they are associated with)
Could it be scripted with Python-fu? (I am comfortable with Python, not scheme)
Thanks, Kent
Question about scripting
I am not following your use of "immutable" (it seems to contradict the statements in parentheses). Perhaps you could clarify that part.
Also, I would caution that in GIMP parlance, the term "resize" generally refers to changing the canvas size of the image (without affecting the pixel data in any way). The term "scaling" is used to describe actually changing the size of image contents. Miscommunication could arise if this convention is not recognized.
I am not aware of a Procedural DataBase function that permits automatic saving of curves or levels. There is support (via some GAP plugins) for the loading and application of such files. The files themselves are simple affairs and there should be little difficulty in writing functions to save them. (Also, the curves and levels can be saved from their corresponding "Layers->Colors..." dialog boxes.)
I am not familiar with Python-fu but all that you described is easily handled by Script-fu and there is little reason to doubt that it cannot be accomplished with Python. The PDB is language agnostic and I think it is fair to say that Script-fu is the least capable of the available scripting languages.
Quoting Kent Tenney :
Is it possible to script this capability? (automatically saving the curves and levels files, under names which indicates which image they are associated with)
Could it be scripted with Python-fu? (I am comfortable with Python, not scheme)
Question about scripting
On Wed, Jul 12, 2006 at 08:43:35AM -0500, Kent Tenney wrote:
A good start in this direction would be if I could automatically save curves and levels files when applying these edits. I could then script associating the color transforms with the image.
Questions: Is it possible to script this capability? (automatically saving the curves and levels files, under names which indicates which image they are associated with)
levels and curves settings can be saved via the gui. i always assumed you could pick those saved values up from a script and use them. it seems like this would only be useful if you were doing a batch conversion and were really confident with using the same adjustment to all of the images.
carol
Question about scripting
Hi,
On Wed, 2006-07-12 at 08:43 -0500, Kent Tenney wrote:
A good start in this direction would be if I could automatically save curves and levels files when applying these edits. I could then script associating the color transforms with the image.
Feel free to contribute PDB functions that allow loading and saving of curves and levels through the PDB. Sounds like a useful addition.
Sven
Question about scripting
On 7/12/06, Sven Neumann wrote:
Hi,
On Wed, 2006-07-12 at 08:43 -0500, Kent Tenney wrote:
A good start in this direction would be if I could automatically save curves and levels files when applying these edits. I could then script associating the color transforms with the image.
Feel free to contribute PDB functions
Does that require writing c code or can it be scripted?
(c = screeching halt)
Thanks, Kent
that allow loading and saving of
curves and levels through the PDB. Sounds like a useful addition.
Sven
Question about scripting
On 7/12/06, saulgoode@brickfilms.com wrote:
I am not following your use of "immutable" (it seems to contradict the statements in parentheses). Perhaps you could clarify that part.
I mean that I do not want to make any changes to the image as it came from the camera/scanner, as doing so would lose data.
The output image, for example a .jpg, cannot be opened, edited and saved, as that introduces unnecessary compression degradation. That's why I call it immutable, to change it I should re-edit the 'master' it came from, edit and compress that file.
Also, I would caution that in GIMP parlance, the term "resize" generally refers to changing the canvas size of the image (without affecting the pixel data in any way). The term "scaling" is used to describe actually changing the size of image contents. Miscommunication could arise if this convention is not recognized.
Thanks for the clarification.
I am not aware of a Procedural DataBase function that permits automatic saving of curves or levels. There is support (via some GAP plugins)
I will look for 'GAP' plugins.
for the loading and application of such files. The files
themselves are simple affairs and there should be little difficulty in writing functions to save them. (Also, the curves and levels can be saved from their corresponding "Layers->Colors..." dialog boxes.)
Right, I'd like to automate the process.
I am not familiar with Python-fu but all that you described is easily handled by Script-fu and there is little reason to doubt that it cannot be accomplished with Python. The PDB is language agnostic and I think it is fair to say that Script-fu is the least capable of the available scripting languages.
I take that to mean that the scripting space has access to - when an image is edited via levels/curves - what adjustment values resulted from the edits
If that is true, then it sounds feasible.
Thanks, Kent
Quoting Kent Tenney :
Is it possible to script this capability? (automatically saving the curves and levels files, under names which indicates which image they are associated with)
Could it be scripted with Python-fu? (I am comfortable with Python, not scheme)
Question about scripting
Hi,
On Thu, 2006-07-13 at 08:47 -0500, Kent Tenney wrote:
Does that require writing c code or can it be scripted?
It requires writing C code, but anyone can learn C in a day or two.
Sven