pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: light weight graphics tool to add text caption



On Sun, Dec 15, 2024 at 8:45 AM Van Ly <van.ly%sdf.org@localhost> wrote:
> Feedback, graphics/xpaint builds but isn't usable, see
> => http://sdf.org/~van.ly/txt/pkgsrc-graphics-xpaint-build-log.text trace
> => http://sdf.org/~van.ly/img/xpaint-A.webp action icons
> => http://sdf.org/~van.ly/img/xpaint-B.webp load file dialog windowframe

Yes also broken UI for me, plus there is a long-standing color-map
defect in XPaint where some images lose original content.

Another idea besides a GUI program would be the Netpbm command line
suite, also in pkgsrc. Sometimes the manual page examples are
insufficient, but I did find a good hint on stackoverflow, herein
snipped from a quick test I ran:

CANVAS_W=4800; CANVAS_H=3450; W=1000; H=1000; x1=500; x2=500
ppmmake blue "${W}" "${H}" > overlay_img.pnm
ppmlabel -x 50 -y 50 -text hello -angle -30 -text there
overlay_img.pnm > overlay_img+text.pnm
ppmmake red "${CANVAS_W}" "${CANVAS_H}" |\
  pamcomp -xoff="${x1}" -yoff="${y1}" "overlay_img+text.pnm" - |\
  pamtopng -transparent=red  > final.png

Also see "pbmtext - render text into a PBM image".

Jm


Home | Main Index | Thread Index | Old Index