1pod::Prima::image-load(U3s)er Contributed Perl Documentatpioodn::Prima::image-load(3)
2
3
4

NAME

6       Prima::image-load - Using image subsystem
7

DESCRIPTION

9       Details on image subsystem - image loading, saving, and codec
10       managements
11

Loading

13   Simple loading
14       Simplest case, loading a single image would look like:
15
16               my $x = Prima::Image-> load( 'filename.duf');
17               die "$@" unless $x;
18
19       Image functions can work being either invoked from package, or from
20       existing Prima::Image object, in latter case the caller object itself
21       is changing. The code above could be also written as
22
23               my $x = Prima::Image-> create;
24               die "$@" unless $x-> load( 'filename.duf');
25
26       In both cases $x contains image data upon success.  Error is returned
27       into $@ variable ( see perldoc perlvar for more info).
28
29   Loading from stream
30       "Prima::Image" can also load image by reading from a stream:
31
32               open FILE, 'a.jpeg' or die "Cannot open:$!";
33               binmode FILE;
34               my $x = Prima::Image-> load( \*FILE);
35               die "$@" unless $x;
36
37   Multiframe loading
38       Multiframe load call can be also issued in two ways:
39
40               my @x = Prima::Image-> load( 'filename.duf', loadAll => 1);
41               die "$@" unless $x[-1];
42
43               my $x = Prima::Image-> create;
44               my @x = $x-> load( 'filename.duf', loadAll => 1);
45               die "$@" unless $x[-1];
46
47       In second case, the content of the first frame comes to $x and $x[0].
48       Sufficient check for error is whether last item of a returned array is
49       defined. This check works also if an empty array is returned.  Only
50       this last item can be an undefined value, others are guaranteed to be
51       valid objects.
52
53       Multiframe syntax is expressed in a set of extra hash keys.  These keys
54       are:
55
56       loadAll
57           Request for loading all frames that can be read from a file.
58           Example:
59
60                   loadAll => 1
61
62       index
63           If present, returns a single frame with index given.  Example:
64
65                   index => 8
66
67       map Contains an anonymous array of frame indices to load.  Valid
68           indices are above zero, negative ones can't be counted in a way
69           perl array indices are. Example:
70
71                    map => [0, 10, 15..20]
72
73   Querying extra information
74       By default Prima loads image data and palette only. For any other
75       information that can be loaded, anonymous hash 'extras' can be defined.
76       To notify a codec that this extra information is desired, loadExtras
77       boolean value is used.  Example:
78
79               my $x = Prima::Image-> load( $f, loadExtras => 1);
80               die "$@" unless $x;
81               for ( keys %{$x-> {extras}}) {
82                  print " $_ : $x->{extras}->{$_}\n";
83               }
84
85       The code above loads and prints extra information read from a file.
86       Typical output, for example, from a gif codec based on libgif would
87       look like:
88
89           codecID : 1
90           transparentColorIndex : 1
91           comment : created by GIMP
92           frames : 18
93
94       'codecID' is a Prima-defined extra field, which is an index of the
95       codec which have loaded the file. This field's value is useful for
96       explicit indication of codec on the save request.
97
98       'frames' is also a Prima-defined extra field, with integer value set to
99       a number of frames in the image. It might be set to -1, signaling that
100       codec is incapable of quick reading of the frame count.  If, however,
101       it is necessary to get actual frame count, a 'wantFrames' profile
102       boolean value should be set to 1 - then frames is guaranteed to be set
103       to a 0 or positive value, but the request may take longer time,
104       especially on a large file with sequential access. Real life example is
105       a gif file with more than thousand frames. 'wantFrames' is useful in
106       null load requests.
107
108   Multiprofile loading requests
109       The parameters that are accepted by load, are divided into several
110       categories - first, those that apply to all loading process and those
111       who apply only to a particular frame. Those who are defined by Prima,
112       are enumerated above - loadExtras, loadAll etc. Only loadExtras,
113       noImageData, noIncomplete and iconUnmask are applicable to a frame,
114       other govern the loading process. A codec may as well define its own
115       parameters, however it is not possible to tell what parameter belongs
116       to what group - this information is to be found in codec documentation;
117
118       The parameters that applicable to any frame, can be specified
119       separately to every desirable frame in single call. For that purpose,
120       parameter 'profiles' is defined. 'profiles' is expected to be an
121       anonymous array of hashes, each hash where corresponds to a request
122       number. Example:
123
124               $x-> load( $f, loadAll => 1, profiles => [
125                    {loadExtras => 0},
126                    {loadExtras => 1},
127               ]);
128
129       First hash there applies to frame index 0, second - to frame index 1.
130       Note that in code
131
132               $x-> load( $f,
133                  map => [ 5, 10],
134                  profiles => [
135                    {loadExtras => 0},
136                    {loadExtras => 1},
137               ]);
138
139       first hash applies to frame index 5, and second - to frame index 10.
140
141   Null load requests
142       If it is desired to peek into image, reading type and dimensions only,
143       one should set 'noImageData' boolean value to 1. Using 'noImageData',
144       empty objects with read type are returned, and with extras 'width' and
145       'height' set to image dimensions. Example:
146
147               $x-> load( $f, noImageData => 1);
148               die "$@" unless $x;
149               print $x-> {extras}-> {width} , 'x' , $x-> {extras}-> {height}, 'x',
150                  $x-> type & im::BPP, "\n";
151
152       Some information about image can be loaded even without frame loading -
153       if the codec provides such a functionality. This is the only request
154       that cannot be issued on a package:
155
156               $x-> load( $f, map => [], loadExtras => 1);
157
158       Since no frames are required to load, an empty array is returned upon
159       success and an array with one undefined value on failure.
160
161   Using Prima::Image descendants
162       If Prima needs to create a storage object, it is by default
163       Prima::Image, or a class name of an caller object, or a package the
164       request was issued on. This behavior can be altered using parameter
165       'className', which defines the class to be used for the frame.
166
167               my @x = Prima::Image-> load( $f,
168                   map => [ 1..3],
169                   className => 'Prima::Icon',
170                   profiles => [
171                       {},
172                       { className => 'Prima::Image' },
173                       {}
174                   ],
175
176       In this example @x will be ( Icon, Image, Icon) upon success.
177
178       When loading to an Icon object, the default toolkit action is to build
179       the transparency mask based on image data. When it is not the desired
180       behavior, e.g., there is no explicit knowledge of image, but the image
181       may or may not contain transparency information, "iconUnmask" boolean
182       option can be used. When set to a "true" value, and the object is
183       "Prima::Icon" descendant, "Prima::Icon::autoMasking" is set to
184       "am::None" prior to the file loading. By default this options is turned
185       off.
186
187   Loading with progress indicator
188       Some codecs (PNG,TIFF,JPEG) can notify the caller as they read image
189       data.  For this purpose, "Prima::Image" has two events, "onHeaderReady"
190       and "onDataReady". If either (or both) are present on image object that
191       is issuing load call, and the codec supports progressive loading, these
192       events are called.  "onHeaderReady" is called when image header data is
193       acquired, and empty image with the dimensions and pixel type is
194       allocated. "onDataReady" is called whenever a part of image is ready
195       and is loaded in the memory of the object; the position and dimensions
196       of the loaded area is reported also. The format of the events is:
197
198           onHeaderReady $OBJECT
199           onDataReady   $OBJECT, $X, $Y, $WIDTH, $HEIGHT
200
201       "onHeaderReady" is called only once, but "onDataReady" is called as
202       soon as new image data is available. To reduce frequency of these
203       calls, that otherwise would be issued on every scanline loaded, "load"
204       has parameter "eventDelay", a number of seconds, which limits event
205       rate. The default "eventDelay" is 0.1 .
206
207       The handling on "onDataReady" must be performed with care. First, the
208       image must be accessed read-only, which means no transformations with
209       image size and type are allowed. Currently there is no protection for
210       such actions ( because codec must perform these ), so a crash will most
211       surely issue.  Second, loading and saving of images is not in general
212       reentrant, and although some codecs are reentrant, loading and saving
213       images inside image events is not recommended.
214
215       There are two techniques to display partial image as it loads. All of
216       these share overloading of "onHeaderReady" and "onDataReady". The
217       simpler is to call "put_image" from inside "onDataReady":
218
219               $i = Prima::Image-> new(
220                       onDataReady => sub {
221                               $progress_widget-> put_image( 0, 0, $i);
222                       },
223               );
224
225       but that will most probably loads heavily underlying OS-dependent
226       conversion of image data to native display bitmap data. A more smarter,
227       but more complex solution is to copy loaded (and only loaded) bits to a
228       preexisting device bitmap:
229
230               $i = Prima::Image-> new(
231                       onHeaderReady => sub {
232                               $bitmap = Prima::DeviceBitmap-> new(
233                                       width    => $i-> width,
234                                       height   => $i-> height,
235                               ));
236                       },
237                       onDataReady => sub {
238                               my ( $i, $x, $y, $w, $h) = @_;
239                               $bitmap-> put_image( $x, $y, $i-> extract( $x, $y, $w, $h));
240                       },
241               );
242
243       The latter technique is used by "Prima::ImageViewer" when it is setup
244       to monitor image loading progress. See "watch_load_progress" in
245       Prima::ImageViewer for details.
246
247   Truncated files
248       By default, codecs are not specified whether they would fail on
249       premature end of file or omit the error and return truncated image.
250       "noIncomplete" boolean flag tells that a codec must always fail if the
251       image cannot be red in full. It is off by default. If indeed the codec
252       detected that the file was incomplete, it sets "truncated" boolean flag
253       in the "extras" profile, if "loadExtras" was requested.
254

Saving

256   Simple saving
257       Typical saving code will be:
258
259          die "$@" unless $x-> save( 'filename.duf');
260
261       Upon a single-frame invocation save returns 1 upon success an 0 on
262       failure.  Save requests also can be performed with package syntax:
263
264          die "$@" unless Prima::Image-> save( 'filename.duf',
265              images => [ $x]);
266
267   Saving to a stream
268       Saving to a stream requires explicit "codecID" to be supplied. When an
269       image is loaded with "loadExtras", this field is always present on the
270       image object, and is an integer that selects image encoding format.
271
272          my @png_id =
273             map  { $_-> {codecID} }
274             grep { $_-> {fileShortType} =~ /^png$/i }
275             @{ Prima::Image-> codecs };
276          die "No png codec installed" unless @png_id;
277
278          open FILE, "> a.png" or die "Cannot save:$!";
279          binmode FILE;
280          $image-> save( \*FILE, codecID => $png_id[0])
281             or die "Cannot save:$@";
282
283   Multiframe saving
284       In multiframe invocation save returns number of successfully saved
285       frames.  File is erased though, if error occurred, even after some
286       successfully written frames.
287
288           die "$@" if scalar(@images) > Prima::Image-> save( $f,
289              images => \@images);
290
291   Saving extras information
292       All information, that is found in object hash reference 'extras', is
293       assumed to be saved as an extra information. It is a codec's own
294       business how it reacts on invalid and/or inacceptable information - but
295       typical behavior is that keys that were not recognized by the codec
296       just get ignored, and invalid values raise an error.
297
298              $x-> {extras}-> {comments} = 'Created by Prima';
299              $x-> save( $f);
300
301   Selecting a codec
302       Extras field 'codecID', the same one that is defined after load
303       requests, selects explicitly a codec for an image to handle. If the
304       codec selected is incapable of saving an error is returned. Selecting a
305       codec is only possible with the object-driven syntax, and this
306       information is never extracted from objects but passed to 'images'
307       array instead.
308
309              $x-> {extras}-> {codecID} = 1;
310              $x-> save( $f);
311
312       Actual correspondence between codecs and their indices is described
313       latter.
314
315       NB - if codecID is not given, codec is selected by the file extension.
316
317   Type conversion
318       Codecs usually are incapable of saving images in all formats, so Prima
319       either converts an image to an appropriate format or signals an error.
320       This behavior is governed by profile key 'autoConvert', which is 1 by
321       default. 'autoConvert' can be present in image 'extras' structures.
322       With autoConvert set it is guaranteed that image will be saved, but
323       original image information may be lost. With autoConvert unset, no
324       information will be lost, but Prima may signal an error. Therefore
325       general-purpose save routines should be planned carefully. As an
326       example the Prima::ImageDialog::SaveImageDialog code might be useful.
327
328       When the conversion takes place, Image property 'conversion' is used
329       for selection of an error distribution algorithm, if down-sampling is
330       required.
331
332   Appending frames to an existing file
333       This functionality is under design, but the common outlines are already
334       set.  Profile key 'append' ( 0 by default ) triggers this behavior - if
335       it is set, then an append attempt is made.
336

Managing codecs

338       Prima provides single function, Prima::Image-> codecs, which returns an
339       anonymous array of hashes, where every hash entry corresponds to a
340       registered codec. 'codecID' parameter on load and save requests is
341       actually an index in this array. Indexes for a codecs registered once
342       never change, so it is safe to manipulate these numbers within single
343       program run.
344
345       Codec information that is contained in these hashes is divided into
346       following parameters:
347
348       codecID
349           Unique integer value for a codec, same as index of the codec entry
350           in results of "Prima::Image->codecs";
351
352       name
353           codec full name, string
354
355       vendor
356           codec vendor, string
357
358       versionMajor and versionMinor
359           usually underlying library versions, integers
360
361       fileExtensions
362           array of strings, with file extensions that are typical to a codec.
363           example: ['tif', 'tiff']
364
365       fileType
366           Description of a type of a file, that codec is designed to work
367           with.  String.
368
369       fileShortType
370           Short description of a type of a file, that codec is designed to
371           work with.  ( short means 3-4 characters ). String.
372
373       featuresSupported
374           Array of strings, with some features description that a codec
375           supports - usually codecs implement only a part of file format
376           specification, so it is always interesting to know, what part it
377           is.
378
379       module and package
380           Specify a perl module, usually inside Prima/Image directory into
381           Prima distribution, and a package inside the module. The package
382           contains some specific functions for work with codec-specific
383           parameters. Current implementation defines only ::save_dialog()
384           function, that returns a dialog that allows to change these
385           parameters. See Prima::ImageDialog::SaveImageDialog for details.
386           Strings, undefined if empty.
387
388       canLoad
389           1 if a codec can load images, 0 if not
390
391       canLoadStream
392           1 if a codec can load images from streams, 0 otherwise
393
394       canLoadMultiple
395           1 if a codec can handle multiframe load requests and load frames
396           with index more than zero. 0 if not.
397
398       canSave
399           1 if a codec can save images, 0 if not.
400
401       canSaveStream
402           1 if a codec can save images to streams, 0 otherwise
403
404       canSaveMultiple
405           Set if a codec can save more that one frame
406
407       canAppend
408           Set if a codec can append frames to an exising file
409
410       types
411           Array of integers - each is a combination of im:: flags, an image
412           type, which a codec is capable of saving. First type in list is a
413           default one; if image type that to be saved is not in that list,
414           the image will be converted to this default type.
415
416       loadInput
417           Hash, where keys are those that are accepted by Prima::Image->
418           load, and values are default values for these keys.
419
420       loadOutput
421           Array of strings, each of those is a name of extra information
422           entry in 'extras' hash.
423
424       saveInput
425           Hash, where keys are those that are accepted by Prima::Image->
426           save, and values are default values for these keys.
427

API

429       This section describes parameters accepted and data returned by
430       "Prima::Image::load"
431
432   Common
433       Loading parameters
434
435       className STRING
436           When loading more than one image, this string is used to create
437           instances of image containers. By default the calling class is used
438           (i.e. "Prima::Image" or "Prima::Icon").
439
440       eventDelay INT
441           Specifies "onDataReady" event granularity in microseconds, if image
442           codec is capable of triggering this event.
443
444           Default: 100
445
446       iconUnmask BOOL
447           If set, "Prima::Icon::autoMasking" is set to "am::None" prior to
448           the file loading.
449
450           Default: false. Only actual for "Prima::Icon" loading.
451
452       index INT
453           When loading from a multiframe file, selects the frame index to
454           load.
455
456           Default: 0
457
458       map [INT]
459           When loading from a multiframe file, selects set of frame indexes
460           to load.
461
462           Default: undef
463
464       loadExtras BOOL
465           If set, all available extra information will be stored in
466           "{extras}" hash on the loaded object.
467
468           Default: false
469
470       loadAll BOOL
471           When loading from a multiframe file, selects that all frames are to
472           be loaded
473
474           Default: false
475
476       noImageData BOOL
477           When set, neither image data is not loaded, nor image dimensions
478           are changed (newly created images have size of 1x1). Instead,
479           "{extras}" contains "width" and "height" integers.
480
481           Default: false
482
483       noIncomplete BOOL
484           Affects the action when image is incomplete, truncated, etc.  If
485           set, signals an error. Otherwise no error is signalled and whatever
486           data could be recovered from the image are returned, and
487           "truncated" flag is set.
488
489           Default: false
490
491       profiles [HASH]
492           Array of hashes passed down to each frame in multiframe loads. Each
493           frame load request will be passed an individual hash, a result of
494           hash join of all profiles passed to "Image::load" and the nth hash
495           in the array.
496
497       wantFrames BOOL
498           Affects how the number of frames in a file is reported in "frames"
499           flag. If set, always scans the file for exact number. Otherwise it
500           is up to the codec to do that.
501
502           Default: false
503
504           See also: frames.
505
506       Load output
507
508       codecID INT
509           Indicates the internal codec ID used to load the image. Can be used
510           for "Image::save".
511
512       frames INT
513           If set to a positive integer, indicates number of frames in a file.
514           Otherwise signals that there are frames, but codec needs an
515           expensive scan to calculate the frames (and "wantFrames" set).
516
517       height INT
518           When "noImageData" is in action, contains image height.
519
520       truncated BOOL
521           When "noIncomplete" is in action, is set if image was truncated.
522
523       width INT
524           When "noImageData" is in action, contains image width.
525
526       Saving parameters
527
528       autoConvert BOOL
529           Affects the action when image cannot be stored in file format in
530           its existing pixel format.  If set, the system tries to convert
531           image into a pixel format understood by the selected codec. Fails
532           otherwise.
533
534           Default: true
535
536       codecID INT
537           Overrides codec selection based on filename extension.
538
539           Default: undef
540
541   BMP codec
542       BMP, the bitmap codec is not depended on external libraries and is
543       always available.
544
545       BitDepth INT
546           Original bit depth, may differ from "Image::bpp".
547
548           Not valid as a saving parameter.
549
550       Compression STRING
551           Bitmap compressing method.
552
553           Not valid as a saving parameter.
554
555       HotSpotX, HotSpotY INT
556           If loading from cursor file, contains pointer hotspot coordinates
557
558       ImportantColors INT
559           Minimal number of colors needed to display the image
560
561       OS2 BOOL
562           Set when loading OS/2 bitmap
563
564       XResolution, YResolution INT
565           Image resolution in PPM
566
567   X11 codec
568       X11, the X Consortium data file codec may depend on external libraries,
569       but is implement internally if these are not found, and is thus always
570       available.
571
572       hotSpotX, hotSpotY INT
573           Contains pointer hotspot coordinates, if any
574
575   XPM codec
576       extensions HASH
577           Set of xpm-specific extension strings. Cannot be used for saving.
578
579       hintsComment, colorsComment, pixelsComment STRING
580           Contains comments to different sections
581
582       hotSpotX, hotSpotY INT
583           Contains pointer hotspot coordinates
584
585       transparentColors [COLOR]
586           Array or transparent colors. Cannot be used for saving.
587
588   JPEG codec
589       Load parameteres
590
591       exifTransform none|auto|wipe
592           If set to "auto" or "wipe", tries to detect whether there is are
593           any exif tags hinting that the image has to be rotated and/or
594           mirrored. If found, applies the transformation accordingly.
595
596           When set to "wipe", in addition to that, removes the exif tags so
597           that subsequent image save won't result in transformed images with
598           exifs tags still present.
599
600           This parameter requires "loadExtras" flag set, because exif tags
601           are stored in extra JPEG data.
602
603       Load output and save input
604
605       appdata [STRING]
606           Array of raw binary strings found in extra JPEG data.
607
608       comment STRING
609           Any comment text found in file.
610
611       progressive BOOL
612           If set, produces a progressively encoded JPEG file.
613
614           Default: 0
615
616           Only used for saving.
617
618       quality INT
619           JPEG quality, 1-100.
620
621           Default: 75
622
623           Only used for saving.
624
625   PNG codec
626       Load input
627
628       background COLOR
629           When PNG file contains alpha channel, and "alpha" is set to
630           "blend", this color is used to blend the background. If set to
631           "clInvalid", default PNG library background color is used.
632
633           Default: clInvalid
634
635           Not applicable "Prima::Icon".
636
637       blending BOOLEAN = 1
638           Affects how to treat aplha channel bits, if any.
639
640           If set, mixes the alpha channel with "background" color in case if
641           loading to an image, or premultiplies color bits (either data or
642           palette) with alpha, if loading to icon. Note that saving back the
643           object will result in different image, but the object is ready to
644           be displayed immediately.
645
646           If unset, color and eventual alpha bits, if loaded to an icon, will
647           not be affected in any way. Note that saving back the object will
648           result in the same image, but the object is not ready to be
649           displayed immediately. See also: "premultiply_alpha" in
650           Prima::Image.
651
652       gamma REAL
653           Override gamma value applied to the loaded image
654
655           Default: 0.45455
656
657       screen_gamma REAL
658           Current gamma value for the operating system, if specified.
659
660           Default: 2.2
661
662       Load output and save input
663
664       background COLOR
665           Default PNG library background color
666
667           Default: clInvalid, which means PNG library default
668
669       gamma REAL
670           Gamma value found in file.
671
672           Default: 0.45455
673
674       iccp_name, iccp_profile STRING
675           Embedded ICC color profiles in raw format
676
677           Default: "unspecified" and "".
678
679       interlaced BOOL
680           If set, PNG file is interlaced
681
682           Default: 0
683
684       mng_datastream BOOL
685           If set, file contains a MNG datastream
686
687           Default: 0
688
689       offset_x, offset_y INT
690           Positive offset from the left edge of the screen to offset_x and
691           the positive offset from the left edge of the screen to offset_y
692
693           Default: 0
694
695       offset_dimension pixel|micrometer
696           Offset units
697
698           Default: pixel
699
700       render_intent none|saturation|perceptual|relative|absolute
701           See PNG docs.
702
703           Default: none
704
705       resolution_x, resolution_y INT
706           Image resolution
707
708           Default: 0
709
710       resolution_dimension meter|unknown
711           Image resolution units
712
713           Default: meter
714
715       scale_x, scale_y
716           Image scale factors
717
718           Default: 1
719
720       scale_unit meter|radian|unknown
721           Image scale factor units
722
723           Default: unknown
724
725       text HASH
726           Free-text comments found in the file
727
728           Default: "{}"
729
730       transparent_colors [COLOR], transparency_table [INT]
731           When image contains transparent colors, returns either array of
732           palette indexes ("transparency_table") in 0-255 range, for paletted
733           images. Or an array of colors in RGB form for 24-bit images
734           ("transparent_colors").
735
736           Not applicable for save.
737
738           Note: support for transparency is not symmetric; codec cannot
739           automatically save the transparency info read from PNG files. See
740           "transparent_color" and "transparent_color_index" for manual save
741           of one transparent color.
742
743       transparent_color COLOR
744           One transparent color value for 24-bit PNG images.
745
746           Default value: clInvalid (i.e. none)
747
748           Not applicable for load.
749
750       transparent_color_index INT
751           One transparent color value, as palette index for 8- or less- bit
752           PNG images.
753
754           Default value: -1 (i.e. none)
755
756           Not applicable for load.
757
758   TIFF codec
759       Load input
760
761       MinIsWhite BOOL
762           Automatically invert "PHOTOMETRIC_MINISWHITE" images
763
764           Default: 1
765
766       Fax BOOL
767           If set, converts 1-bit grayscale with ratio 2:1 into 2-bit
768           grayscale (alglorithm also known as faxpect).
769
770           Default: 0
771
772       Load output
773
774       Photometric STRING
775           TIFF "PHOTOMETRIC_XXX" constant. One of:
776
777             MinIsWhite
778             MinIsBlack
779             Palette
780             YCbCr
781             RGB
782             LogL
783             LogLUV
784             Separated
785             MASK
786             CIELAB
787             DEPTH
788             Unknown
789
790       BitsPerSample INT
791           Bits used to represent a single sample, 1-64
792
793       SamplesPerPixel INT
794           Number of samples per pixel, 1-4. F.ex. most images have 1 sample.
795           Planar TIFFs may split low and high bytes in 2 samples.  RGB has 3
796           samples, YCbCr and RGBA has 4.
797
798       PlanarConfig contiguous|separate
799           "separate" images split individual samples or components (f.ex. R
800           and G and B) into individual planes. "contiguous" mix sample bytes
801           one after another.
802
803       SampleFormat STRING
804           Pixel sample format, one of:
805
806             unsigned integer
807             signed integer
808             floating point
809             untyped data
810             complex signed int
811             complex floating point
812
813       Tiled BOOL
814           If set, TIFF is tiled
815
816       Faxpect BOOL
817           When "Fax" option set set to "true", and indeed the image was
818           converted from 1 to 2 bits, this parameter will be set to signal
819           this.
820
821       CompressionType STRING
822           Compression algorithm used for reading TIFF. One of:
823
824             NONE
825             CCITTRLE
826             CCITTFAX3
827             CCITTFAX4
828             LZW
829             OJPEG
830             JPEG
831             NEXT
832             CCITTRLEW
833             PACKBITS
834             THUNDERSCAN
835             IT8CTPAD
836             IT8LW
837             IT8MP
838             IT8BL
839             PIXARFILM
840             PIXARLOG
841             DEFLATE
842             ADOBE_DEFLATE
843             DCS
844             JBIG
845             SGILOG
846             SGILOG24
847
848       Save input
849
850       Compression STRING
851           Same values as in "CompressionType". Different names are used to
852           avoid implicit but impossible compression selection, because
853           tibtiff can decompress many types, but compress only a few.
854
855       Load output and save input
856
857       generic strings
858           The following keys have no specific meanings for Prima, but are
859           both recognized for loading and saving:
860
861             Artist
862             Copyright
863             DateTime
864             DocumentName
865             HostComputer
866             ImageDescription
867             Make
868             Model
869             PageName
870             PageNumber
871             PageNumber2
872
873       PageNumber, PageNumber2 INT
874           Default: 1
875
876       ResolutionUnit inch|centimeter|none
877           Default: none
878
879       Software
880           Default: Prima
881
882       XPosition, YPosition INT
883           Default: 0
884
885       XResolution, YResolution INT
886           Default: 1200
887
888   GIF codec
889       For GIF animation see Prima::Image::AnimateGIF.
890
891       The following load output and save input keys are recognized:
892
893       comment STRING
894           GIF comment text
895
896       delayTime INT
897           Delay in hundredth of a second between frames
898
899           Default: 1
900
901       disposalMethod INT
902           Animation frame disposal method
903
904             DISPOSE_NOT_SPECIFIED    = 0; # Leave frame, let new frame draw on top
905             DISPOSE_KEEP             = 1; # Leave frame, let new frame draw on top
906             DISPOSE_CLEAR            = 2; # Clear the frame's area, revealing bg
907             DISPOSE_RESTORE_PREVIOUS = 3; # Restore the previous (composited) frame
908
909           Default: 0
910
911       interlaced BOOL
912           If set, GIF is interlaced
913
914           Default: 0
915
916       left, top INT
917           Frame offset in pixels
918
919           Default: 0
920
921       loopCount INT
922           How many times the GIF animation loops. 0 means indefinite.
923
924           Default: 1
925
926       screenBackGroundColor COLOR
927           GIF screen background color
928
929           Default: 0
930
931       screenColorResolution INT
932           Default: 256
933
934       screenWidth, screenHeight INT
935           Default: -1, i.e. use image width and height
936
937       screenPalette [INT]
938           Default: 0,0,0,255,255,255
939
940       transparentColorIndex INT
941           Index of GIF transparent color
942
943           Default: 0
944
945       userInput INT
946           User input flag
947
948           Default: 0
949

AUTHOR

951       Dmitry Karasik, <dmitry@karasik.eu.org>.
952

SEE ALSO

954       Prima, Prima::Image, Prima::codecs
955
956
957
958perl v5.28.0                      2017-02-28         pod::Prima::image-load(3)
Impressum