Prima::...:base64(3)
okay bestie, welcome to Prima::...:base64(3) β a User Contributed Perl Documentation page π
this one is all about Prima::Image::base64, and itβs lowkey iconic.
β¨ NAME β¨
Prima::Image::base64 β hardcoded image files π
π¦ DESCRIPTION π¦
It loads and saves images from and to base64-encoded data streams. This allows loading images directly from the source code β yes bestie, the image is literally chilling inside your code, no cap β¨
π SYNOPSIS π
my $icon = Prima::Icon->load_stream(<<~'ICON');
R0lGODdhIAAgAIAAAAAAAP///ywAAAAAIAAgAIAAAAD///8CT4SPqcvtD6OctNqLcwogcK91nEhq
3gim2Umm4+W2IBzX0fvl8jTr9SeZiU5E4a1XLHZ4yaal6XwFoSwMVUVzhoZSaQW6ZXjD5LL5jE6r
DQUAOw==
ICON
print $icon->save_stream;
π API π
load, load_image BASE64_STRING, %OPTIONS
Decodes BASE64_STRING and tries to load an image from it. Returns image reference(s) on success, or undef, ERROR_STRING on failure π
load_icon BASE64_STRING, %OPTION
Same as load_image but returns a Prima::Icon instance. Note the %OPTION singular, iykyk π«Ά
save IMAGE_OR_ICON, %OPTIONS
Saves an image to a datastream and encodes it in base64. Unless $OPTIONS{codecID} or "$image-"{extras}->{codecID}> field is set, it tries to deduce the best codec for the job β yes, that second field is spelled exactly like that on the page, Iβm not touching it, periodt.
Returns the encoded content on success, or undef, ERROR_STRING on failure π
πΈ AUTHOR πΈ
Dmitry Karasik, <dmitry@karasik.eu.org>.
π SEE ALSO π
PrimaPrima::ImagePrima::image-load
xoxo π this page is from perl v5.42.0, dated 2024-08-20, and its footer manual name is Prima::...:base64(3) β bye bestie π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms