![]() |
![]()
| ![]() |
![]()
NAMEPrima::Dialog::ImageDialog - file open and save dialogs. DESCRIPTIONThe module provides dialogs specially adjusted for image loading and saving. Prima::Dialog::ImageOpenDialogProvides a preview feature, allowing the user to view the image file before loading, and the selection of a frame index for the multi-framed image files. Instead of "execute" call, the load method is used to invoke the dialog and returns the loaded image as a "Prima::Image" object. The loaded object by default contains "{extras}" hash variable set, which contains extra information returned by the loader. See Prima::image-load for more information. SYNOPSISuse Prima qw(Application Dialog::ImageDialog); my $dlg = Prima::Dialog::ImageOpenDialog-> new; my $img = $dlg-> load; return unless $img; print "$_:$img->{extras}->{$_}\n" for sort keys %{$img-> {extras}}; Proprties
Methods
Events
Prima::Dialog::ImageSaveDialogProvides a save dialog where the user can select image format, the bit depth and other format-specific options. The format-specific options can be set if a dialog for the file format is provided. The standard toolkit dialogs reside under in "Prima::Image" namespace, in Prima/Image subdirectory. For example, "Prima::Image::gif" provides the selection of transparency color, and "Prima::Image::jpeg" the image quality control. If the image passed to the image property contains "{extras}" variable, the data are read and used as the default values. In particular, "{extras}->-{codecID}" field, responsible for the file format, if present, affects the default file format selection. SYNOPSISmy $dlg = Prima::Dialog::ImageSaveDialog-> create; return unless $dlg-> save( $image ); print "saved as ", $dlg-> fileName, "\n"; Properties
Methods
AUTHORDmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSOPrima, Prima::Window, Prima::codecs, Prima::image-load, Prima::Image, Prima::Dialog::FileDialog, Prima::ImageViewer, examples/iv.pl.
|