Quantcast

How to input multiple lines of text onto seperate photos

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to input multiple lines of text onto seperate photos

oneaty
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

--
TeddyRuxpinBear (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Bob Long
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

_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Rick Strong-2
In reply to this post by oneaty
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: [hidden email]
Cc: [hidden email]
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)

...

_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Ofnuts-2
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...


_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Rick Strong-2
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: [hidden email]
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...


_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Joao S. O. Bueno Calligaris
On 16 March 2017 at 10:27, Rick Strong <[hidden email]> 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: [hidden email]
> 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...
>
>
> _______________________________________________
> gimp-user-list mailing list
> List address:    [hidden email]
> 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:    [hidden email]
> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Rick Strong-2
"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: [hidden email] ; [hidden email]
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
photos

On 16 March 2017 at 10:27, Rick Strong <[hidden email]> 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: [hidden email]
> 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...
>
>
> _______________________________________________
> gimp-user-list mailing list
> List address:    [hidden email]
> 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:    [hidden email]
> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Joao S. O. Bueno Calligaris
On 16 March 2017 at 16:46, Rick Strong <[hidden email]> 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: [hidden email] ; [hidden email]
>
> Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
> photos
>
> On 16 March 2017 at 10:27, Rick Strong <[hidden email]> 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: [hidden email]
>> 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...
>>
>>
>> _______________________________________________
>> gimp-user-list mailing list
>> List address:    [hidden email]
>> 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:    [hidden email]
>> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Rick Strong-2
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: [hidden email] ; [hidden email]
Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
photos

On 16 March 2017 at 16:46, Rick Strong <[hidden email]> 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: [hidden email] ; [hidden email]
>
> Subject: Re: [Gimp-user] How to input multiple lines of text onto seperate
> photos
>
> On 16 March 2017 at 10:27, Rick Strong <[hidden email]> 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: [hidden email]
>> 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...
>>
>>
>> _______________________________________________
>> gimp-user-list mailing list
>> List address:    [hidden email]
>> 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:    [hidden email]
>> 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:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to input multiple lines of text onto seperate photos

oneaty
In reply to this post by Bob Long
>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.

--
TeddyRuxpinBear (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to input multiple lines of text onto seperate photos

oneaty
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

--
TeddyRuxpinBear (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Kevin Cozens-2
In reply to this post by Rick Strong-2
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 <disclaimer/favourite> |             --Chris Hardwick
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to input multiple lines of text onto seperate photos

Kevin Cozens-2
In reply to this post by oneaty
On 2017-03-16 07:43 PM, TeddyRuxpinBear wrote:
> http://pastebin.com/bhfhMAZY

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 <disclaimer/favourite> |             --Chris Hardwick
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to input multiple lines of text onto seperate photos

oneaty
>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


--
TeddyRuxpinBear (via www.gimpusers.com/forums)
_______________________________________________
gimp-user-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list
List archives:   https://mail.gnome.org/archives/gimp-user-list
Loading...