How to input multiple lines of text onto seperate photos
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.
- postings
- 4
How to input multiple lines of text onto seperate photos
Hello, what I would like to do is to designate an area on a photo, and have GIMP automatically put a collection of text strings I have onto an individual photo (one text string per photo)
For example, these are my text strings (Music01, Music02, Music03)
I would like to input them onto the area highlighted in red on attachment [x01], so that they appear like it does in the other attachments. I would have the list of all the text that needs to inputted ready and would just need a code that can input the text onto the area, and save it with the same name.
I have looked at other software and the only similar one I found was BIMP. It seems to be limited in the areas of the positioning the text and only allows me to input one line of text for multiple photos.
Thank you very much for reading this.
-
[x01]
x01.png (10.5 KB) -
Example
Music01.png (29.6 KB)
How to input multiple lines of text onto seperate photos
TeddyRuxpinBear wrote on 16/03/17 09:07:
Hello, what I would like to do is to designate an area on a photo, and have GIMP automatically put a collection of text strings I have onto an individual photo (one text string per photo)
For example, these are my text strings (Music01, Music02, Music03)
I would like to input them onto the area highlighted in red on attachment [x01], so that they appear like it does in the other attachments. I would have the list of all the text that needs to inputted ready and would just need a code that can input the text onto the area, and save it with the same name.
I have looked at other software and the only similar one I found was BIMP. It seems to be limited in the areas of the positioning the text and only allows me to input one line of text for multiple photos.
Thank you very much for reading this.
Attachments: * http://www.gimpusers.com/system/attachments/520/original/x01.png * http://www.gimpusers.com/system/attachments/521/original/Music01.png
Maybe http://www.imagemagick.org/script/montage.php using -annotate or -draw?
Bob Long
How to input multiple lines of text onto seperate photos
Yes, it would be nice if GIMP had simple a scripting language.
I.E. "Get text from here.
"Format it.
"Place it here.
Rick S.
-----Original Message-----
From: TeddyRuxpinBear
Sent: Wednesday, March 15, 2017 7:07 PM
To: gimp-user-list@gnome.org
Cc: notifications@gimpusers.com
Subject: [Gimp-user] How to input multiple lines of text onto seperate
photos
Hello, what I would like to do is to designate an area on a photo, and have
GIMP
automatically put a collection of text strings I have onto an individual
photo
(one text string per photo)
...
How to input multiple lines of text onto seperate photos
On 16/03/17 05:18, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.
The devils is in the details... In "place it here":
what is "it": the center? a corner (which)? the baseline? the
middle of the uppercase characters?
and what is "here"? Absolute coordinates? The center of the
picture? A corner? Relative to the whole image or to a specific layer?
By the time you have covered most use cases, you have something like the current script system...
How to input multiple lines of text onto seperate photos
However GIMP defines it relative to the coordinates of the given box, I guess. I could script it in PageMaker, Corel Draw, InDesign, and MS Word.
What is the current scripting system in GIMP?
Rick S.
-----Original Message-----
From: Ofnuts
Sent: Thursday, March 16, 2017 2:20 AM
To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
photos
On 16/03/17 05:18, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.
The devils is in the details... In "place it here":
what is "it": the center? a corner (which)? the baseline? the
middle of the uppercase characters?
and what is "here"? Absolute coordinates? The center of the
picture? A corner? Relative to the whole image or to a specific layer?
By the time you have covered most use cases, you have something like the current script system...
How to input multiple lines of text onto seperate photos
On 16 March 2017 at 10:27, Rick Strong wrote:
However GIMP defines it relative to the coordinates of the given box, I guess. I could script it in PageMaker, Corel Draw, InDesign, and MS Word.
What is the current scripting system in GIMP?
thre are two - GIMP cna use both scheme or Python - and the calls
can't get much simpler -
they just require information.
Since both are full featured langauges that allow you to define functions, you can inside your script, define a function that will render the required text on a given layer, position it at a fixed porportional heihgt, and center it on the image using nothing but simple arithmetic and GIMP provided API.
(And also, load several images from a folder, open a text file, and match the text to the image based on name, or whatever you want to do).
Rick S.
-----Original Message----- From: Ofnuts Sent: Thursday, March 16, 2017 2:20 AM To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate photosOn 16/03/17 05:18, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.The devils is in the details... In "place it here":
what is "it": the center? a corner (which)? the baseline? the middle of the uppercase characters?
and what is "here"? Absolute coordinates? The center of the picture? A corner? Relative to the whole image or to a specific layer?By the time you have covered most use cases, you have something like the current script system...
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/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 List archives: https://mail.gnome.org/archives/gimp-user-list
How to input multiple lines of text onto seperate photos
"there are two - GIMP can use both scheme or Python"
Where would I find them? (Win 7-64 Pro, SP1)
Rick S.
-----Original Message-----
From: Joao S. O. Bueno
Sent: Thursday, March 16, 2017 10:17 AM
To: Rick Strong
Cc: ofnuts@gmx.com ; gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
photos
On 16 March 2017 at 10:27, Rick Strong wrote:
However GIMP defines it relative to the coordinates of the given box, I guess. I could script it in PageMaker, Corel Draw, InDesign, and MS Word.
What is the current scripting system in GIMP?
thre are two - GIMP cna use both scheme or Python - and the calls
can't get much simpler -
they just require information.
Since both are full featured langauges that allow you to define functions, you can inside your script, define a function that will render the required text on a given layer, position it at a fixed porportional heihgt, and center it on the image using nothing but simple arithmetic and GIMP provided API.
(And also, load several images from a folder, open a text file, and match the text to the image based on name, or whatever you want to do).
Rick S.
-----Original Message----- From: Ofnuts Sent: Thursday, March 16, 2017 2:20 AM To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate photosOn 16/03/17 05:18, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.The devils is in the details... In "place it here":
what is "it": the center? a corner (which)? the baseline? the middle of the uppercase characters?
and what is "here"? Absolute coordinates? The center of the picture? A corner? Relative to the whole image or to a specific layer?By the time you have covered most use cases, you have something like the current script system...
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/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 List archives: https://mail.gnome.org/archives/gimp-user-list
How to input multiple lines of text onto seperate photos
On 16 March 2017 at 16:46, Rick Strong wrote:
"there are two - GIMP can use both scheme or Python"
Where would I find them? (Win 7-64 Pro, SP1)
they are built in to GIMP
filters->Python->console
filters->script-fu->console;
Use the "browse" button at the bottom of either dialog to browse the
available programmatic
calls.
Seach for samples installed either on your computer, along with GIMP
(ex. .py files in your
GIMP plug-ins folder) or on the internet to have plug-in examples.
To play along on the console, in Python you have to get a reference to
the active image -
type:
img = gimp.image_list()[0]
(actually this is a reference to the most recently open image)
Rick S.
-----Original Message----- From: Joao S. O. Bueno Sent: Thursday, March 16, 2017 10:17 AM To: Rick Strong
Cc: ofnuts@gmx.com ; gimp-user-list@gnome.orgSubject: Re: [Gimp-user] How to input multiple lines of text onto seperate photos
On 16 March 2017 at 10:27, Rick Strong wrote:
However GIMP defines it relative to the coordinates of the given box, I guess. I could script it in PageMaker, Corel Draw, InDesign, and MS Word.
What is the current scripting system in GIMP?
thre are two - GIMP cna use both scheme or Python - and the calls can't get much simpler -
they just require information.Since both are full featured langauges that allow you to define functions, you can inside your script, define a function that will render the required text on a given layer, position it at a fixed porportional heihgt, and center it on the image using nothing but simple arithmetic and GIMP provided API.
(And also, load several images from a folder, open a text file, and match the text to the image based on name, or whatever you want to do).
Rick S.
-----Original Message----- From: Ofnuts Sent: Thursday, March 16, 2017 2:20 AM To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate photosOn 16/03/17 05:18, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.The devils is in the details... In "place it here":
what is "it": the center? a corner (which)? the baseline? the middle of the uppercase characters?
and what is "here"? Absolute coordinates? The center of the picture? A corner? Relative to the whole image or to a specific layer?By the time you have covered most use cases, you have something like the current script system...
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/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 List archives: https://mail.gnome.org/archives/gimp-user-list
How to input multiple lines of text onto seperate photos
For which there is no documentation.
Rick S.
-----Original Message-----
From: Joao S. O. Bueno
Sent: Thursday, March 16, 2017 4:09 PM
To: Rick Strong
Cc: ofnuts@gmx.com ; gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
photos
On 16 March 2017 at 16:46, Rick Strong wrote:
"there are two - GIMP can use both scheme or Python"
Where would I find them? (Win 7-64 Pro, SP1)
they are built in to GIMP
filters->Python->console
filters->script-fu->console;
Use the "browse" button at the bottom of either dialog to browse the
available programmatic
calls.
Seach for samples installed either on your computer, along with GIMP
(ex. .py files in your
GIMP plug-ins folder) or on the internet to have plug-in examples.
To play along on the console, in Python you have to get a reference to
the active image -
type:
img = gimp.image_list()[0]
(actually this is a reference to the most recently open image)
Rick S.
-----Original Message----- From: Joao S. O. Bueno Sent: Thursday, March 16, 2017 10:17 AM To: Rick Strong
Cc: ofnuts@gmx.com ; gimp-user-list@gnome.orgSubject: Re: [Gimp-user] How to input multiple lines of text onto seperate photos
On 16 March 2017 at 10:27, Rick Strong wrote:
However GIMP defines it relative to the coordinates of the given box, I guess. I could script it in PageMaker, Corel Draw, InDesign, and MS Word.
What is the current scripting system in GIMP?
thre are two - GIMP cna use both scheme or Python - and the calls can't get much simpler -
they just require information.Since both are full featured langauges that allow you to define functions, you can inside your script, define a function that will render the required text on a given layer, position it at a fixed porportional heihgt, and center it on the image using nothing but simple arithmetic and GIMP provided API.
(And also, load several images from a folder, open a text file, and match the text to the image based on name, or whatever you want to do).
Rick S.
-----Original Message----- From: Ofnuts Sent: Thursday, March 16, 2017 2:20 AM To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
photosOn 16/03/17 05:18, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.The devils is in the details... In "place it here":
what is "it": the center? a corner (which)? the baseline? the middle of the uppercase characters?
and what is "here"? Absolute coordinates? The center of the picture? A corner? Relative to the whole image or to a specific layer?By the time you have covered most use cases, you have something like the current script system...
_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/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 List archives: https://mail.gnome.org/archives/gimp-user-list
- postings
- 4
How to input multiple lines of text onto seperate photos
TeddyRuxpinBear wrote on 16/03/17 09:07: Maybe http://www.imagemagick.org/script/montage.php using -annotate or -draw?
I tried using this software and I lost on trying to get it to work. I feel like the scripting software in GIMP would be more usable. Thanks though.
___
As for GIMP, I took your guy's advice and started using Script-Fu. I believe I have created a script that would do what I am trying to accomplish, but I am having some issues getting it to run. Here is the script:
Steps:
1. To create the background image template for all the pictures (1920x1080 & RGB)
(gimp-image-new width height type)
(gimp-image-new 1920 1080 RGB)
2. To use the bucket fill tool to color the Background layer black (HTML - 000000) (gimp-context-set-background background) (gimp-context-set-background (0 0 0))
3. To input the given text at the specified location (gimp-text-fontname image drawable x y text border antialias size size-type fontname) (gimp-text-fontname Untitled Background 100 100 "Hello" 0 TRUE 90 PIXELS "Times New Roman")
4. To save the photo in the requested area (gimp-file-save run-mode image drawable filename raw-filename) (gimp-file-save NONINTERACTIVE Untitled Background "c:\Users\Name\Desktop\RequiredFolder\SectionA" "")
Raw Code:
(gimp-image-new 1920 1080 RGB) (gimp-context-set-background (0 0 0)) (gimp-text-fontname Untitled Background 100 100 "Hello" 0 TRUE 90 PIXELS "Times New Roman") (gimp-file-save NONINTERACTIVE Untitled Background "c:\Users\Name\Desktop\RequiredFolder\SectionA" "")
I have tried entering in this script all at once, and each individually; I have had no luck with either. If anyone knows where I went wrong, or has some edits for the code, please let me know.
- postings
- 4
How to input multiple lines of text onto seperate photos
That is a little too hard to read and I cannot find a way to edit my post. Here is a pastebin version: http://pastebin.com/bhfhMAZY
How to input multiple lines of text onto seperate photos
On 2017-03-16 12:18 AM, Rick Strong wrote:
Yes, it would be nice if GIMP had simple a scripting language. I.E. "Get text from here.
"Format it.
"Place it here.
There are several ways to write scripts for GIMP. Whether you would find them simple or not will depend on your background.
On 2017-03-16 09:27 AM, Rick Strong wrote: > What is the current scripting system in GIMP?
Script-Fu (Scheme based), and Python are the main ones but you can also write scripts in Perl and there is a Ruby binding but I don't know if it will still work in a recent version of GIMP.
Cheers! Kevin. http://www.ve3syb.ca/ |"Nerds make the shiny things that distract Owner of Elecraft K2 #2172 | the mouth-breathers, and that's why we're | powerful!" #include | --Chris Hardwick
How to input multiple lines of text onto seperate photos
On 2017-03-16 07:43 PM, TeddyRuxpinBear wrote:
In the Script-Fu examples (0 0 0) should be '(0 0 0)
Cheers! Kevin. http://www.ve3syb.ca/ |"Nerds make the shiny things that distract Owner of Elecraft K2 #2172 | the mouth-breathers, and that's why we're | powerful!" #include | --Chris Hardwick
- postings
- 4
How to input multiple lines of text onto seperate photos
In the Script-Fu examples (0 0 0) should be '(0 0 0)
Thank you Kevin. It seems that this is my problem now:
(4)(#t)Error: ((gimp-file-save NONINTERACTIVE Untitled Background "c:\Users\lukek\Desktop\RequiredFolder\SectionA" "") : 4) eval: unbound variable: Untitled
I tried changing the name of the file with (gimp-image-set-filename Untitled Picture), but it seems to have caused a new error
(5)Error: ((gimp-context-set-background '(0 0 0)) (gimp-text-fontname Picture Background 100 100 "Hello" 0 TRUE 90 PIXELS "Times New Roman") (gimp-file-save NONINTERACTIVE Picture Background "c:\Users\lukek\Desktop\RequiredFolder\SectionA" "") : 3) eval: unbound variable: Untitled