1Prima::Image::base64(3)User Contributed Perl DocumentatioPnrima::Image::base64(3)
2
3
4

NAME

6       Prima::Image::base64 - hard-coded image files
7

DESCRIPTION

9       Handles base64-encoded data streams to load images directly from source
10       code.
11

SYNOPSIS

13               my $icon = Prima::Icon->load_stream(<<~'ICON');
14                       R0lGODdhIAAgAIAAAAAAAP///ywAAAAAIAAgAIAAAAD///8CT4SPqcvtD6OctNqLcwogcK91nEhq
15                       3gim2Umm4+W2IBzX0fvl8jTr9SeZiU5E4a1XLHZ4yaal6XwFoSwMVUVzhoZSaQW6ZXjD5LL5jE6r
16                       DQUAOw==
17                       ICON
18
19               print $icon->save_stream;
20

API

22       load, load_image BASE64_STRING, %OPTIONS
23           Decodes BASE64_STRING and tries to load an image from it.  Returns
24           image reference(s) on success, or "undef, ERROR_STRING" on failure.
25
26       load_icon BASE64_STRING, %OPTION
27           Same as "load_image" but returns a "Prima::Icon" instance.
28
29       save IMAGE_OR_ICON, %OPTIONS
30           Saves image into a datastream and return it encoded in base64.
31           Unless $OPTIONS{codecID} or "$image-"{extras}->{codecID}> is set,
32           tries to find the best codec for the job.
33
34           Returns encoded content on success, or "undef, ERROR_STRING" on
35           failure.
36

AUTHOR

38       Dmitry Karasik, <dmitry@karasik.eu.org>.
39

SEE ALSO

41       Prima, Prima::Image, Prima::image-load
42
43
44
45perl v5.38.0                      2023-07-21           Prima::Image::base64(3)
Impressum