Mojolic...ipe::Png(3)

✨ NAME ✨

okay bestie, welcome to Mojolicious::Plugin::AssetPack::Pipe::Png β€” the manual page your header knows as Mojolic...ipe::Png(3) 🫢. Its whole vibe? Crush PNG image files. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

🌸 Application

plugin AssetPack => {pipes => ["Png"]};

# Forces the use of "optipng -clobber -preserve $input"
app->asset->pipe("Png")->app("optipng");

# Forces the use of "pngquant --speed 2 -"
app->asset->pipe("Png")->app("pngquant");

# Set custom application arguments:
app->asset->pipe("Png")->app("pngquant")->app_args([qw(--speed 10 --ordered -)]);

πŸŽ€ DESCRIPTION πŸŽ€

Mojolicious::Plugin::AssetPack::Pipe::Png can be used to crush "png" image files. literally its whole job, and it ate πŸ”₯.

This plugin has default settings for "pngquant" (default) and "optipng". Which will be the default in the future is unknown, so force the one you want in case that matters. no cap, future vibes are mysterious 🌈.

This pipe is EXPERIMENTAL. Feedback wanted. πŸ‘‘ yep, it said it, not me.

TODO: Detect which application is installed and use the best available.

TODO: Add support for pngcrush.


πŸ’œ ATTRIBUTES πŸ’œ

🧚 app

$str = $self->app;
$self = $self->app("pngquant");

Can be used to set a custom application. so if you wanna pick the app, this is your moment ✨.

πŸ“ app_args

$array = $self->app_args;
$self = $self->app_args([qw(-clobber $input)]);

Can be used to set custom "app" arguments. The special $input string in the argument list will be replaced with the path to a temp file holding the image data. bestie, that $input placeholder is doing main character work πŸ’….

If no $input element is found in the "app_args" list, then STDIN and STDOUT will be used instead. periodt πŸŽ€.


🌟 METHODS 🌟

πŸ”₯ process

See "process" in Mojolicious::Plugin::AssetPack::Pipe. that’s the lore iykyk πŸ“š.


🌈 SEE ALSO 🌈

Mojolicious::Plugin::AssetPack. go peek, bestie πŸ‘€.


mwah πŸ’‹ β€” this page is from perl v5.42.0, dated 2024-12-12, and its manual tag is Mojolic...ipe::Png(3).

πŸ“¦ where this page comes from