Perlba...:Palimg(3pm)

πŸ“¦
version 1.80 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– Perlba...:Palimg(3pm) πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation section of the manual β€” it's the manpage for Perlbal::Plugin::Palimg (that's the 3pm bit, iykyk). sit down, grab a strawberry, we're gonna talk about ✨images✨


πŸŽ€ NAME πŸŽ€

Perlbal::Plugin::Palimg β€” a plugin that lets Perlbal serve palette altered images. literally its whole personality.


πŸ¦‹ VERSION πŸ¦‹

This documentation you're reading rn is about Perlbal::Plugin::Palimg, and it ships with Perlbal 1.50. periodt.


🌸 DESCRIPTION 🌸

Palimg is a perlbal plugin that lets you modify GIF and PNG files on the fly, no cap. here's the vibe:

  • drop the images you wanna be able to mess with into the DOCROOT/palimg/ directory
  • then you modify them by slapping /pSPEC onto the end of the url
  • where SPEC is one of the commands defined below (gradient, tint, etc.)

it's giving "why edit images offline when you can just ~ask the server nicely~" πŸ’…


✨ CONFIGURING PERLBAL ✨

to get your Perlbal installation on the Palimg train, you gotta do two things:

  1. LOAD the plugin
  2. add a service parameter to a web_server service to activate it

here's an example perlbal.conf, slay:

LOAD palimg

CREATE SERVICE palex
   SET listen         = ${ip:eth0}:80
   SET role           = web_server
   SET plugins        = palimg
   SET docroot        = /usr/share/doc/
   SET dirindexing    = 0
ENABLE palex

🌈 GRADIENTS 🌈

wanna change the gradient of your image? add /pg0011111164ffffff to the end of the url. let me break that down fr fr:

  • 00 β€” the index where the gradient starts
  • 111111 β€” the color (in hex) of the beginning of the gradient
  • 64 β€” the index of the end of the gradient
  • ffffff β€” the color of the end of the gradient
⚠️ note bestie: all colors specified in hex should be lowercase. lowercase only, we don't do uppercase here πŸ™ˆ

Example:

http://192.168.0.1/palimg/logo.gif/pg01aaaaaa99cccccc

πŸ“ TINTING πŸ“

you can tint the image by adding /pt000000aaaaaa to the end of the url. deets:

  • 000000 should be replaced with the color to tint towards
  • aaaaaa is optional and defines the "dark" tint color
  • both colors should be specified as lowercase hex numbers

Example:

http://192.168.0.1/palimg/logo.gif/pt1c1c1c22dba1

πŸ‘‘ PALETTE REPLACEMENT πŸ‘‘

you can specify a palette to replace the palette of the image. how, you ask? add up to six sets of seven hex lowercase numbers prefixed with /p to the end of the URL. that's the whole recipe πŸ’…

Example:

http://192.168.0.1/palimg/logo.gif/p01234567890abcfffffffcccccccddddddd

πŸ’€ BUGS AND LIMITATIONS πŸ’€

there are no known bugs in this module. iconic behavior honestly.

if you do run into problems, please report them to the Perlbal mailing list: http://groups.google.com/group/perlbal

Patches are welcome. 🫢


🧚 AUTHORS 🧚

  • Brad Fitzpatrick <brad@danga.com>
  • Mark Smith <junior@danga.com>

Artistic/GPLv2, at your choosing. pick your fighter, both are valid πŸ’…

Copyright 2004, Danga Interactive Copyright 2005-2007, Six Apart Ltd


and that's the whole page bestie!! this was brought to you by perl v5.34.0, dated 2022-06-28, and it's the Perlba...:Palimg(3pm) page from the User Contributed Perl Documentation. go forth and palette-alter some images, you absolute main character πŸ¦‹βœ¨

πŸ“¦ where this page comes from