teracow / googliser

a fast BASH multiple-image downloader
GNU General Public License v3.0
207 stars 38 forks source link

overlay image filenames on thumbs? #65

Closed teracow closed 4 years ago

teracow commented 4 years ago

something like https://stackoverflow.com/a/12754055/6182835

MBtech commented 4 years ago

You mean in the gallery image, right?

teracow commented 4 years ago

Yes, each gallery thumbnail would have the source filename (or URL index) overlaid.

I'm currently messing-about with this to get a feel for what mods will be required in googliser:

#!/usr/bin/env bash

for img in google*.jpeg; do
    width=$(identify -format %W ${img})
    height=$(identify -format %H ${img})
    newheight=$((height / 10))
    printf 'name:%s\twidth:%s\theight:%s\tnewheight:%s\n' "$img" "$width" "$height" "$newheight"
    convert -background '#0008' -gravity center -fill white -size ${width}x${newheight} caption:"${img}" "${img}" +swap -gravity south -composite "with-caption-${img}"
done
teracow commented 4 years ago

An observation:

It's slow. Every image needs to be resized first, then have overlay applied. Else montage can crop image (and the overlaid title) when building gallery.

Kinda kills the appeal of "speedy" downloading. So I'm not sure it will be worth continuing to develop this. :(

teracow commented 4 years ago

Discontinuing this for now but might revisit it again at some point.