It is currently Sat Jun 29, 2024 4:15 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Script request
PostPosted: Thu Feb 03, 2022 7:56 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Oct 07, 2010
Posts: 439
Location: home/Nixnine/.gimp-2.0/scripts/nixnine.scm
GIMP Version: 2.10.28
Operating System: Linux
GIMP Experience: Experienced User



Does anyone know of a script which could generate layers with sequential numbers -- like page numbers -- perhaps with the options to select sequence quantity, font selection, font size and color? Maybe even location -- i.e bottom or top right/bottom or top left?

Thanks!

_________________
I refuse to be confused, but am often confused at this refusal.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Script request
PostPosted: Thu Feb 03, 2022 9:23 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2435
Not Gimp Maybe look at ImageMagick. IM has the ability to join several tiff files into a single multi-page tif that Gimp can open.

The bare bones, it boils down to how many command line variables you want to add, so for font size and position edit the script. So for this
sh pages.sh 400 800 "I love Gimp" 6

You get 6 annotated pages in one file

#!/bin/bash

# use sh pages.sh width height "caption in quotes"  number of pages
# make the pages and number them
for i in $(seq 1 1 $4)
do
convert -size $1x$2 xc: $i.tif
mogrify  -gravity South -pointsize 40 -annotate +5+5 "$3"  $i.tif
mogrify  -gravity SouthEast -pointsize 40 -annotate +30+5 "$i"  $i.tif
done

# make multi-page tif
convert *.tif multi.tif

# Delete the redundant files
for i in $(seq 1 1 $4)
do
rm $i.tif
done


Attachment:
pages.jpg
pages.jpg [ 116.01 KiB | Viewed 733 times ]

_________________
Image


Top
 Post subject: Re: Script request
PostPosted: Thu Feb 03, 2022 10:54 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2260
Location: Poland
Hi Nixnine.

Is it so hard? :hoh
Only as an exception for You: ;)
https://www.gimpscripts.net/2020/10/add ... ayers.html


Attachments:
Number Layer.png
Number Layer.png [ 447.61 KiB | Viewed 707 times ]

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: Script request
PostPosted: Thu Feb 03, 2022 12:35 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Oct 07, 2010
Posts: 439
Location: home/Nixnine/.gimp-2.0/scripts/nixnine.scm
Thanks, MareroQ, that works great.

I ran it for 250 numbers and then batch saved each layer as a separate image.

Thanks again!

_________________
I refuse to be confused, but am often confused at this refusal.


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts My shameful n00b request for help

3

No new posts Attachment(s) pm_create_a_water_drop_text.py (Issabella request) updated

17

No new posts Attachment(s) pm_plexi_text_effect plugin (Issabella request) version_2

13

No new posts Request- Make a scriptfu out of my X Window stroke outline hack

1

No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2



* Login  



Powered by phpBB3 © phpBB Group