Prima::Image::base64 - hardcoded image files
Loads and saves images from and to base64-encoded data streams. This allows loading images directly from the source code.
my $icon = Prima::Icon->load_stream(<<~'ICON'); R0lGODdhIAAgAIAAAAAAAP///ywAAAAAIAAgAIAAAAD///8CT4SPqcvtD6OctNqLcwogcK91nEhq 3gim2Umm4+W2IBzX0fvl8jTr9SeZiU5E4a1XLHZ4yaal6XwFoSwMVUVzhoZSaQW6ZXjD5LL5jE6r DQUAOw== ICON print $icon->save_stream;
Decodes BASE64_STRING and tries to load an image from it. Returns image reference(s) on success, or undef, ERROR_STRING on failure.
undef, ERROR_STRING
Same as load_image but returns a Prima::Icon instance.
load_image
Prima::Icon
Saves an image to a datastream and encodes it in base64. Unless the $OPTIONS{codecID} or $image-{extras}->{codecID}> field is set, tries to deduce the best codec for the job.
$OPTIONS{codecID}
$image-
Returns the encoded content on success, or undef, ERROR_STRING on failure.
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima, Prima::Image, Prima::image-load
To install Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prima
CPAN shell
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.