Add Text>IPTC ... too long text line to fully show IPTC data

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Add Text>IPTC ... too long text line to fully show IPTC data

Post by oops66 »

Hello,
I have a too long text line to fully show into the image (if a lot of IPTC Keywords are into the metadata) in:Batch Convert>Add Text>IPTC ...
... So my request is to treat IPTC datas/Keywords as text file (with an extra option), and merge/dissolve it into the image with % of transparency.

Batch Convert>Add Text>IPTC (KO if a lot of Keywords/cars - only one line)

Code: Select all

  {IPTC:Keywords}
  {IPTC:Created Date}
... So {IPTC:Keywords} only works if there are only few Keywords/chars, because only one line is used (of course also depends of image size and text size) but...

Maybe it is possible to process like convert - from Imagemagick. ?
My workaround (recursive in a folder):
1-) First, create a text file for all IPTC data:

Code: Select all

for f in *.jpg; do convert $f ${f%}_out-IPTC.8BIMTEXT; done
2-) Create a semi transparent(here 30%) .png image of each IPTC text files.

Code: Select all

for f in *.8BIMTEXT; do convert -font helvetica -fill black -undercolor "rgba(255,255,255,0.30)" -pointsize 15 -size 1480x -gravity Center caption:"$(cat $f)" ${f%}_out-IPTC.png; done
or: grep keywords only:

Code: Select all

for f in *.8BIMTEXT; do convert -font helvetica -fill black -undercolor "rgba(255,255,255,0.30)" -pointsize 15 -size 1480x -gravity Center caption:"$(cat $f | grep -e Date -e Keyword | cut -c14-)" ${f%}_out-IPTC.png; done
3-) Compose and dissolve the two images with transparency

Code: Select all

for f in *_out.jpg; do convert $f ${f%}_out-IPTC.png -alpha on -compose dissolve -define compose:args='30,90' -gravity South -composite ${f%}_d.png composite -compose Dst_Over -tile pattern:checkerboard ${f%}_d.png ${f%}_dd.png ; done

# the result:  convert to png2jpg to the directory: JPG_IPTC
mkdir JPG_IPTC
for f in *_dd.png; do convert $f ./JPG_EXIF_IPTC/${f%}_out-EXIF-IPTC.jpg; done
... Maybe an easier/faster way is possible to do that?
Example (in a text, not only in one line):
Imagehttp://i.imgur.com/qpPbSA5.jpg
-------------------------------------------------
PS:
Batch Convert>Add Text>EXIF-Data (IS OK, because number of cars are more standardized for each fields)

Code: Select all

  {EXIF:Date Taken [Y-m-d_H-M-S]}
  F{EXIF:F-Number} - S: {EXIF:Exposure Time} - ISO:{EXIF:ISO Value} - f: {EXIF:Focal Length}_r:{Ratio}
  {EXIF:Flash} - {EXIF:Model} - {EXIF:Make}
  GPS:{EXIF:Latitude}-{EXIF:Longitude} 
XnViewMP Linux X64 - Debian - X64
Post Reply