|
||
Clicking the Sources tab gives you these options:
Transferring bitmaps To/From the procedure where the Call Button is added.
Send this bitmap TO the editor
If you have the option on the General tab checked to use ProImage as a page editor for another control, then you would enter the name of the ImageEx bitmap to send TO the editor when it is loaded. If that option is not checked, the template entry is disabled.
If you select this option and specify the name of a valid ImageEx bitmap object, then it will be sent to the editor.
Note: In almost all our code we use the name IEView to represent the name of the ImageEx VIEWER object. So the bitmap for that object would be IEView.Bitmap. You could also "send" a bitmap that was not displayed as long as what you are referring to is a standard ImageEx bitmap object.
Reload this bitmap FROM the editor
In most cases when you exit the editor you want to display the screen image created on another viewer control (such as on the parent form).
If you select this option and specify the name of a ImageEx VIEWER object here then the image returned from a successful SAVE in the editor will be displayed in the named control when the editor window closes. As above, you could also "send" a bitmap that was not displayed as long as what you are referring to is a standard ImageEx bitmap object.
If the bitmap returned is larger than the viewer on the parent form, you will most likely want it to be zoomed to fit the viewer area. However if it is smaller then you don't want it zoomed to fit as that might distort the image (unless the aspect ratio is the same as the viewer).
To solve this problem, follow these steps:
Define these two local variables
ViewerW SIGNED
ViewerH SIGNED
Place this code in the OpenWindow embed for the parent form where the viewer resides:
!Save viewer size
IEView.GetPosition(,, ViewerW, ViewerH )
In the ProImageCallButtonAfterEditor embed place this code:
!Zoom to fit if needed
!If the returned image will not display completely in the viewer (possible if rotated)
IF IEView.Bitmap.GetWidth() > ViewerW OR IEView.Bitmap.GetHeight() > ViewerH
!Zoom to fit
IEView.ZoomToFit()
END !IF
This will solve the problem for you and give your user a nice consistent interface without distorting your photos. You can also use the same code logic after loading a image into the viewer when the parent form opens.
Auto Update Base Filename on new file load
This option will change the base filename when the user loads a new file. That name is then passed to the SAVE dialog. This is quite useful when processing multiple photos.
Preset User Load Options
If you enable this option, then you can check the boxes of different load options that you want the user to have access to in the editor.
Any item not checked when the preset mode is enabled will not appear on the load menu in the editor.
ProImage can load an image from any of these sources:
●File Drag and Drop - as the name implies, the user can drag any supported image type from Windows Explorer and drop it on the editor.
Hint: If the editor is behind another window, the normal Windows method to do this is to drag the file to the icon on the taskbar, then pause until the editor window comes to the top, then drop it on the editor.
●File Dialog - a picture file dialog box dialog is presented to the user
●Digital Camera - a picture file dialog box is presented to the user. However the drive location is mapped out to the actual path on the camera where the photos are stored. The first time this option is presented, the user is given a Camera Finder Wizard to help them map out the correct path. The next time that path is used as the source folder for the picture dialog box.
●Media Reader- a picture file dialog box is presented to the user. However the drive location is mapped out to the actual path on the media reader card where the photos are stored. The first time this option is presented, the user is given a Media Finder Wizard to help them map out the correct path. The next time that path is used as the source folder for the picture dialog box.
●Windows Clipboard - a image (if one exists) is loaded from the Windows clipboard.
●Scanner - a TWAIN dialog box to initiate a scan is presented to the user. The first time this option is used the user will be presented with a selection box where they can choose a scanner source. The next time that source is automatically used.
●Internet - a dialog box is presented to the user where they can type (or paste) a URL to a photo on the Internet.
●Webcam - a TWAIN dialog box to initiate a capture from a Webcam is presented to the user. The first time this option is used the user will be presented with a selection box where they can choose a Webcam source. The next time that source is automatically used.
●Multipage TIFF File - this feature will open a TIFF previewer where the user can open a multi-page TIFF file and move from page to page. Then the can select any page to send back to the editor
●FAX TIFF File - this feature will open a TIFF previewer where the user can open a multi-page FAX TIFF file and move from page to page. Then the can select any page to send back to the editor. The user can also "repair" a FAX that was scanned with a lower vertical resolution so that the image does not appear distorted.
Initial Zoom Mode
This option allows you to preset that a image be zoomed to fit the viewer (or target) or fill it.
In fit mode - the image can not extend beyond the boundaries. If the image and the target or viewer are not the exact same aspect ratio, then this may result in some "blank space" being padded (in a solid white color) between where the edge of the photo (on two sides) and the edge of the final image.
In fill mode - the image is first zoomed to fit - then it is incrementally zoomed out until the source image completely fills the viewer or target space. This results in the final image being 100% drawn from the source with no white edges. It may result in portions of the source image being cropped away. Usually if the aspect ratios of the source image and the viewer or target are close to each other - this is not a big deal.