Load options (LoadOptions) can be used, if desired, to provide specific instructions when loading an image from file or from stream. If no load options are specified, ImagXpress® uses default values when loading the image.
General Load Options
- The offset in the file or memory buffer where ImagXpress will begin reading image data (ImageOffset property).
- Whether alpha channel data is to be loaded (LoadAlphaChannel).
- Whether the image should be loaded as a thumbnail and the size of the desired thumbnail (ThumbnailSize).
- Whether the image is scaled to gray when LoadResize is used to load the image. (ScaleToGray).
- Whether preserve black will be applied to the image when loaded to increase readability. (PreserveBlack).
- Whether the image will be cropped, resized and/or rotated upon loading (the ImageX object will get a modified version of the original image, based on the requested operations).
LoadCrop, LoadResize and LoadRotate are not supported when loading an image from a stream as the entire image must be loaded before the ImageX object can be modified.
When more than one of these operations is requested, the order is:
- LoadCrop
Image is cropped to the dimensions specified in CropRectangle. If the dimensions specified are all zeros or null, then no crop occurs when loading.
- LoadResize
Whether the image resizes when loading (Resize). If the parameters are all zeros or null, then no resize occurs when loading. Whether the image aspect ratio will be preserved when loading an image (MaintainAspectRatio).
- LoadRotate
Whether image is rotated upon loading (Rotation property).
Colorspace Conversions
CMYK Conversion - If a CMYK Tiff image file is loaded into ImagXpress, it is automatically converted to RGB. The application can use the ICM properties to control the CMYK conversion process.
Image Color Management Loading Options
When loading an image into an ImageX object, you can specify how color management is applied.
- To avoid color management when loading, set UseEmbeddedColorManagement = False.
-
To perform color management using the color profile specified in the image metadata:
-
Set LoadOptions.UseEmbeddedColorManagement = True
-
Specify how profiles should be applied, by setting the ColorRenderIntent property (for example, Picture, Graphics, Business or Colorimetric interpretation.)
-
The image is modified to reflect the color profile, then loaded.
-
-
To perform color management using a color profile specified in a file:
-
Set LoadOptions.UseEmbeddedColorManagement = False.
-
Specify how profiles should be applied, by setting the ColorRenderIntent property (for example, Picture, Graphics, Business or Colorimetric interpretation.)
-
Set the SourceProfileName to the name of the color profile you wish to apply to the image being loaded
-
The image is modified to reflect the color profile, then loaded.
-
FTP Loading Options
If username/passwords and proxy settings are needed, set InternetOptions.
Image Format-Specific Load Options
CAD (LoadOptionsCad)
- Layers: The Layer method specifies the layer of the CAD drawing to load. LayoutToRender specifies the layout of the CAD drawing to load.
- Rendering: The PaperBitDepth, PaperResolutionX, PaperResolutionY, PaperWidth, PaperHeight, and PaperResolutionUnits all specify how the CAD image should be rendered when loaded.
JBIG2 (LoadOptionsJbig2)
- Swap Black and White: SwapBlackandWhite property specifies if the values for black and white use industry default or not.
JPEG (LoadOptionsJpeg)
JpegXR (LoadOptionsJpegXR)
- Filter: the PostProcessingFilter property specifies the post processing filter to be used when loading the image.
PIC (LoadOptionsPic)
- Password: Password to protect the .PIC file
Metafile (LoadOptionsMetafile)
- Resolution: the Resolution property specifies the resolution to which the image is loaded.
PDF (LoadOptionsPdf)
- Swap Black and White: When SwapBlackandWhite is set, the PDF file will be loaded with black and white pixels swapped.
TIFF (LoadOptionsTiff)
- Offset: The IFDOffset in the source file or memory buffer where ImagXpress will begin reading image data.
- Special: Whether this is a banking-vendor specific application requiring special tiff handling (SpecialHandling).
Difference Between RAW and Camera Raw
RAW files are uncompressed images that have the image data stored separately from the image header describing the data. This is common in medical and DICOM images. However it is not limited to that environment as the image header and image data may be stored separately in a database. Camera Raw is one of many camera manufacturer's proprietary image file format of the raw analog-to-digital conversion data. This is typically greater than 8-bits per channel. Most camera manufacturer's use a proprietary format that was adapted from an existing file format such as TIFF. For this reason, ImagXpress usually takes additional time verifying the file format when CameraRaw is enabled.
Using the LoadRaw method for loading in a RAW file:
- Set LoadOptions.LoadMode to raw, in order to treat the image data as a raw format when loading.
- Use the remaining properties within the LoadOptionsRaw class to specify how data loads from the raw data format.
- When the image is loaded, the data will be interpreted using the LoadOptionsRaw properties.
Versus...
Loading a camera manufacturer's proprietary raw image file format:
The ImagXpress control has the ability to inspect an image when loading to determine that an image is in a camera raw format, identify the specific camera raw format of the image, and load the image using that format.
- Make sure that the LoadOptions.LoadMode property is set to Normal, in order to inspect the image data when loading to determine format.
- Set LoadOptions.CameraRawEnabled = True to specify that the image should be examined on loading to see if the data is in a camera raw format, and to identify the raw format.
- Load the image, using one of the load methods (e.g. FromFile). The image will be inspected to see if it is in a CameraRaw format as part of the loading process. The image will be decoded using the specific camera raw format detected.
To optimize performance, set CameraRawEnabled to False when it is not needed.
When CameraRawEnabled = True, the image can only be loaded from a file. Loading from a stream is not supported as the entire image must be loaded before the raw format can be recognized.