Classes | |
| struct | GFScaleParam |
| struct | FilterParam |
| struct | ApplyGammaParam |
| struct | CutOffOutOfRangeValuesParam |
| struct | ExpandRangeValuesParam |
| struct | ApplyToneFunctionParam |
| struct | CacheParam |
| struct | ScaleParam |
| struct | SmoothScaleParam |
| struct | OverlayParam |
| struct | PhotometricTransformParam |
| struct | QualityHintParam |
| struct | CallbackImageParam |
| struct | VFZQualityParam |
| struct | RotateAndFlipParam |
Typedefs | |
| typedef double(* | ToneFunction )(double inValue, void *inContext) |
Enumerations | |
| enum | ScalingMethod { KeepCurrentMethod = 0, NearestNeighbour = 1, Average = 2, Bilinear = 3, Bicubic = 4 } |
| enum | FourAngles { faAngle0 = 0, faAngle90 = 90, faAngle180 = 180, faAngle270 = 270 } |
Functions | |
| AutoPtr< Image > | GFScale (Image *inImage, double inMag=1.0, size_t inSrcPanelWidth=256, size_t inSrcPanelHeight=256) |
| AutoPtr< Image > | GFScale (Image *inImage, ssize_t inDstWidth, ssize_t inDstHeight, size_t inSrcPanelWidth=256, size_t inSrcPanelHeight=256) |
| AutoPtr< Image > | UniformFilter (Image *inImage, const ssize_t *inFilter, size_t inDiam, size_t inNorm=0) |
| AutoPtr< Image > | Sharpness_4 (Image *inImage, size_t n=0) |
| AutoPtr< Image > | Sharpness_8 (Image *inImage, size_t n=0) |
| AutoPtr< Image > | ApplyGamma (Image *inImage, double inGamma=1.0) |
| AutoPtr< Image > | CutOffOutOfRangeValues (Image *inImage, double inMinValue=0.0L, double inMaxValue=1.0L) |
| AutoPtr< Image > | ExpandRangeValues (Image *inImage, double inMinValue=0.0L, double inMaxValue=1.0L) |
| AutoPtr< Image > | ApplyToneFunction (Image *inImage, ToneFunction inToneFunction, void *inContext) |
| AutoPtr< Image > | ToSRGB (Image *inImage, Photometric inRgbPhotometric=pmRGB8, RenderingIntent inIntent=riPerceptual) |
| AutoPtr< Image > | PhotometricTransform (Image *inImage, Photometric inDestPhotometric, ColorProfile *inDestProfile=NULL, ColorProfile *inSrcProfile=NULL, RenderingIntent inIntent=riPerceptual) |
| AutoPtr< Image > | Crop (Image *inImage, const Rect &inRect) |
| AutoPtr< Image > | Scale (Image *inImage, double inMag=1.0) |
| AutoPtr< Image > | Scale (Image *inImage, ssize_t inWidth, ssize_t inHeight) |
| AutoPtr< Image > | SmoothScale (Image *inImage, double inMag=1.0) |
| AutoPtr< Image > | SmoothScale (Image *inImage, ssize_t inWidth, ssize_t inHeight) |
| AutoPtr< Image > | RotateAndFlip (Image *inImage, FourAngles inAngle=faAngle0, bool inFlipVertical=false, bool inFlipHorizontal=false) |
| AutoPtr< Image > | Overlay (Image *inBackgroundImage, Image *inOverlayImage=NULL, ssize_t inOverlayPosLeft=0, ssize_t inOverlayPosTop=0) |
| AutoPtr< Image > | ExtraMargin (Image *inImage) |
| AutoPtr< Image > | ImageCache (Image *inImage, size_t inTileWidth=256, size_t inTileHeight=256, size_t inBytesAvailable=(size_t)-1) |
| AutoPtr< Image > | CallbackImage (Image *inImage, ProcessCallback *inCallback=NULL, size_t inResponses=10) |
| AutoPtr< Image > | ImageFromRawData (const void *inFirstLinePtr, ssize_t inRowStride, Photometric inPm, ssize_t inWidth, ssize_t inHeight, ColorProfile *inProf=NULL) |
| AutoPtr< ImageWritable > | ImageBuffer (ssize_t inWidth, ssize_t inHeight, Photometric inPm=pmRGB8, ColorProfile *inProf=NULL) |
| AutoPtr< ImageWritable > | ImageBuffer2 (ssize_t inWidth, ssize_t inHeight, ssize_t inRowStride, Photometric inPm=pmRGB8, ColorProfile *inProf=NULL) |
| AutoPtr< ImageWritable > | ImageBuffer (Image *inImage, bool inOnTheFly=false) |
| AutoPtr< Image > | ImageMultiThread (Image *inImage, size_t inMaxThreads) |
| typedef double(* Celartem::ImageUtils::ToneFunction)(double inValue, void *inContext) |
This defines a prototype for the tone transfer function.
| inValue | The input value. For normal images, it can be within 0.0 to 1.0. In some cases, especially for HDR images, it can be out of range value. | |
| inContext | This value is passed by ApplyToneFunction. |
Definition at line 144 of file pxl_imagefilters.h.
This defines 4 special angles, which stand for 0 degree, 90 degree, 180 degree and 270 degree. They're used for transformation of the images.
Definition at line 493 of file pxl_imageparam.h.
This enumeration is used with ScaleParam to choose the method for rescaling the image.
Definition at line 107 of file pxl_imageparam.h.
| AutoPtr<Image> Celartem::ImageUtils::ApplyToneFunction | ( | Image * | inImage, | |
| ToneFunction | inToneFunction, | |||
| void * | inContext | |||
| ) |
| AutoPtr<Image> Celartem::ImageUtils::CallbackImage | ( | Image * | inImage, | |
| ProcessCallback * | inCallback = NULL, |
|||
| size_t | inResponses = 10 | |||
| ) |
This function creates a new Image instance that periodically calls the specified ProcessCallback instance during the process of ImageLock::read function. The instance internally divides the area requested by ImageLock::read to several areas and process them separately. This function could not deal with the Image instances created by ImageCache function.
| inImage | The input image. | |
| inCallback | Pointer to a ProcessCallback class instance. | |
| inResponses | The number of responses during the process. |
This function creates a new Image instance that extracts a portion of the input Image. We recommend you should use this function just before export functions. You should not insert the image created by the function since the output image behaves as if it were a static image and it does not accept any parameters by the Image::setParam function. Anyway, you don't have to crop the image if you don't want to export it since PixelLive SDK does not process the whole image unless you want to do it. The extraction of the partial image can be done by ImageLock::read function.
| inImage | Specifies the base Image instance. | |
| inRect | Rect instance that indicates the portion to be extracted. |
| AutoPtr<Image> Celartem::ImageUtils::CutOffOutOfRangeValues | ( | Image * | inImage, | |
| double | inMinValue = 0.0L, |
|||
| double | inMaxValue = 1.0L | |||
| ) |
| AutoPtr<Image> Celartem::ImageUtils::ExpandRangeValues | ( | Image * | inImage, | |
| double | inMinValue = 0.0L, |
|||
| double | inMaxValue = 1.0L | |||
| ) |
This function creates a new Image instance that generates extra margins to the input Image.
Some Image classes calls the input Images's read function with the rectangle of invalid range such as (-3,-3)-(50,50). This class generates the margins for the Image classes that could not create such margins.
| inImage | Specifies the Image instance that produces the main image. |
| AutoPtr<Image> Celartem::ImageUtils::GFScale | ( | Image * | inImage, | |
| ssize_t | inDstWidth, | |||
| ssize_t | inDstHeight, | |||
| size_t | inSrcPanelWidth = 256, |
|||
| size_t | inSrcPanelHeight = 256 | |||
| ) |
GFScale provides the image scaling function, which is known as Genuine Fractals. The technology is licensed by LizardTech, Inc. To customize the parameter for GF scaling, you can use GFScaleParam .
Please note that This function is provided by PixelLive 3.0 SDK GF Add-in (not included in PixelLive 3.0 SDK).
| inImage | The image to be scaled. | |
| inDstWidth | The width of the output image in pixels. | |
| inDstHeight | The height of the output image in pixels. | |
| inSrcPanelWidth | The panel width of the input image. It affects on the quality and speed. The larger the value goes, the higher the quality grows but the processing speed gets slow. Anyway, in usual cases, you don't have to touch the parameter. | |
| inSrcPanelHeight | The panel width of the input image. It affects on the quality and speed. The larger the value goes, the higher the quality grows but the processing speed gets slow. Anyway, in usual cases, you don't have to touch the parameter. |
| AutoPtr<Image> Celartem::ImageUtils::GFScale | ( | Image * | inImage, | |
| double | inMag = 1.0, |
|||
| size_t | inSrcPanelWidth = 256, |
|||
| size_t | inSrcPanelHeight = 256 | |||
| ) |
GFScale provides the image scaling function, which is known as Genuine Fractals. The technology is licensed by LizardTech, Inc.
To customize the parameter for GF scaling, you can use GFScaleParam . Please note that This function is provided by PixelLive 3.0 SDK GF Add-in (not included in PixelLive 3.0 SDK).
| inImage | The image to be scaled. | |
| inMag | The scale ratio. 1.0 stands for 100%. | |
| inSrcPanelWidth | The panel width of the input image. It affects on the quality and speed. The larger the value goes, the higher the quality grows but the processing speed gets slow. Anyway, in usual cases, you don't have to touch the parameter. | |
| inSrcPanelHeight | The panel width of the input image. It affects on the quality and speed. The larger the value goes, the higher the quality grows but the processing speed gets slow. Anyway, in usual cases, you don't have to touch the parameter. |
| AutoPtr<ImageWritable> Celartem::ImageUtils::ImageBuffer | ( | Image * | inImage, | |
| bool | inOnTheFly = false | |||
| ) |
This function creates an ImageWritable instance from the raw data ripped from the specified Image instance. The function is useful when you want to manually modify the output image from some Image chain.
| inImage | Source Image instance. | |
| inOnTheFly | If this parameter is true, the ripping is done on the fly; the duplication is by only one ImageLock::read call.Otherwise ( false), this function is done by several ImageLock::read calls to reduce the memory usage.The default is false. |
| AutoPtr<ImageWritable> Celartem::ImageUtils::ImageBuffer | ( | ssize_t | inWidth, | |
| ssize_t | inHeight, | |||
| Photometric | inPm = pmRGB8, |
|||
| ColorProfile * | inProf = NULL | |||
| ) |
This function creates an ImageWritable instance based on the specified metrics.
The Image instance returned by the function already equips its own ExtraMargin implementation.
| inWidth | Width of the image. | |
| inHeight | Height of the image. | |
| inPm | Photometric of the image. | |
| inProf | ColorProfile instance to be associated. |
| AutoPtr<ImageWritable> Celartem::ImageUtils::ImageBuffer2 | ( | ssize_t | inWidth, | |
| ssize_t | inHeight, | |||
| ssize_t | inRowStride, | |||
| Photometric | inPm = pmRGB8, |
|||
| ColorProfile * | inProf = NULL | |||
| ) |
This function creates an ImageWritable instance based on the specified metrics.
The Image instance returned by the function already equips its own ExtraMargin implementation.
| inWidth | Width of the image. | |
| inHeight | Height of the image. | |
| inRowStride | Row-Stride of the image. If this value is negative, the image is created as bottom-up image. | |
| inPm | Photometric of the image. | |
| inProf | ColorProfile instance to be associated. |
| AutoPtr<Image> Celartem::ImageUtils::ImageCache | ( | Image * | inImage, | |
| size_t | inTileWidth = 256, |
|||
| size_t | inTileHeight = 256, |
|||
| size_t | inBytesAvailable = (size_t)-1 | |||
| ) |
This function creates a new Image instance that caches the data from the specified Image.
| inImage | The input image. | |
| inTileWidth | The width of each cache tile. | |
| inTileHeight | The height of each cache tile. | |
| inBytesAvailable | The memory amount that the image created by this function can use. If this value is -1, the amount is automatically set. |
| AutoPtr<Image> Celartem::ImageUtils::ImageFromRawData | ( | const void * | inFirstLinePtr, | |
| ssize_t | inRowStride, | |||
| Photometric | inPm, | |||
| ssize_t | inWidth, | |||
| ssize_t | inHeight, | |||
| ColorProfile * | inProf = NULL | |||
| ) |
This function creates a new Image instance from the specified read-only buffer.
The buffer should be accessible during the lifetime of the returned Image instance; in other words, you should be aware of the lifetime of the buffer.
The Image instance returned by the function already equips its own ExtraMargin implementation.
| inFirstLinePtr | The pointer to the first line in the RAW data. | |
| inRowStride | The row-stride of the RAW data. | |
| inPm | The photometric of the RAW data. | |
| inWidth | Width of the image. | |
| inHeight | Height of the image. | |
| inProf | A Color Profile that describes the colorspace of the RAW data. |
This function enables you to render the image with multiple threads. The image passed to this function is automatically processed with multiple threads without any complex configurations.
With the current version, MrSID images cannot be used with this function. This restriction will be fixed in the future releases.
For more information about multi-threading, see ImageLock.
| inImage | Source Image instance. |
| AutoPtr<Image> Celartem::ImageUtils::Overlay | ( | Image * | inBackgroundImage, | |
| Image * | inOverlayImage = NULL, |
|||
| ssize_t | inOverlayPosLeft = 0, |
|||
| ssize_t | inOverlayPosTop = 0 | |||
| ) |
This function creates a new Image instance that overlays an Image on another Image using alpha channel.
| inBackgroundImage | The base image to be overlaid onto. | |
| inOverlayImage | The image to be overlaid. | |
| inOverlayPosLeft | ||
| inOverlayPosTop | The overlay position. The values can exceeds the limit of the base image; they can be negative values or a values no less than width of the inBackgroundImage. |
| AutoPtr<Image> Celartem::ImageUtils::PhotometricTransform | ( | Image * | inImage, | |
| Photometric | inDestPhotometric, | |||
| ColorProfile * | inDestProfile = NULL, |
|||
| ColorProfile * | inSrcProfile = NULL, |
|||
| RenderingIntent | inIntent = riPerceptual | |||
| ) |
This function creats a new Image instance that provides a colormetric transformation from the specified Image instance. This function tries the following procedures to convert colors:
If you are going to convert images to sRGB, you had better use ToSRGB function.
Please note that this function may take long time.
You can also customize the transform dynamically using PhotometricTransformParam.
| inImage | The image to be transformed. | |
| inDestPhotometric | The destination photometric. | |
| inDestProfile | The destination color profile. It can be NULL if you don't care of the conversion result. If the profile is not NULL, it must be compatible with the Photometric specified by inDestPhotometric. The compatibility of the profile is checked by ColorProfile::isCompatiblePhotometric function. | |
| inSrcProfile | If you don't want to use the profile associated to the inImage, you can explicitly specify the profile by this parameter. In usual case, it should be NULL. | |
| inIntent | The intent of the transform. This is one of the RenderingIntent enumeration values. |
| AutoPtr<Image> Celartem::ImageUtils::RotateAndFlip | ( | Image * | inImage, | |
| FourAngles | inAngle = faAngle0, |
|||
| bool | inFlipVertical = false, |
|||
| bool | inFlipHorizontal = false | |||
| ) |
This function creates a new Image instance that rotates and flips the input image.
The rotation is usually in conter-clockwise direction. Since the vertical/horizontal flip is done after rotation, the rotation is done in clockwise direction if only one of vertical or horizontal rotation is enabled.
| inImage | Specifies the base Image instance. | |
| inAngle | Specifies the angle of the output image. | |
| inFlipVertical | Whether flips the image vertically after the rotation. | |
| inFlipHorizontal | Whether flips the image horizontally after the rotation. |
This function creates a new Image instance that rescales the input Image.
You can also direct the Image instance to re-rescale the Image runtimely by Image::setParam function with ScaleParam structure.
| inImage | Specifies the base Image instance. | |
| inWidth | The new width of the image in pixels. | |
| inHeight | The new height of the image in pixels. |
This function creates a new Image instance that rescales the input Image.
You can also direct the Image instance to re-rescale the Image runtimely by Image::setParam function with ScaleParam structure.
| inImage | Specifies the base Image instance. | |
| inMag | The magnification coeffecient. 1.0 stands for the original size. |
This function creates a new Image instance that applies the following sharpness filter to the specified instance:
| 0 | -1 | 0 |
| -1 | 5+n | -1 |
| 0 | -1 | 0 |
| inImage | An image to apply sharpness on. | |
| n | The mildness of the output image. The default is 0. It can be any value no less than 0. |
This function creates a new Image instance that applies the following sharpness filter to the specified instance:
| -1 | -1 | -1 |
| -1 | 9+n | -1 |
| -1 | -1 | -1 |
| inImage | An image to apply sharpness on. | |
| n | The mildness of the output image. The default is 0. It can be any value no less than 0. |
| AutoPtr<Image> Celartem::ImageUtils::SmoothScale | ( | Image * | inImage, | |
| ssize_t | inWidth, | |||
| ssize_t | inHeight | |||
| ) |
This function creates a new Image instance that rescales the input Image.
You can also direct the Image instance to re-rescale the Image runtimely by Image::setParam function with SmoothScaleParam structure.
| inImage | Specifies the base Image instance. | |
| inWidth | The new width of the image in pixels. | |
| inHeight | The new height of the image in pixels. |
This function creates a new Image instance that rescales the input Image.
You can also direct the Image instance to re-rescale the Image runtimely by Image::setParam function with SmoothScaleParam structure.
| inImage | Specifies the base Image instance. | |
| inMag | The magnification coeffecient. 1.0 stands for the original size. |
| AutoPtr<Image> Celartem::ImageUtils::ToSRGB | ( | Image * | inImage, | |
| Photometric | inRgbPhotometric = pmRGB8, |
|||
| RenderingIntent | inIntent = riPerceptual | |||
| ) |
This function creats a new Image instance that converts the Photometric of the specified Image instance into sRGB color space. This is the easiest way to obtain sRGB image.
This function internally calls PhotometricTransform and it may take so much time to create the internal photometric transform instance.
| inImage | The image to be transformed. | |
| inRgbPhotometric | The destination photometric; it should be one of RGB variants, otherwise this function fails and throws some exception. For the list of Photometrics, see PhotometricDefinition. | |
| inIntent | The intent of the transform. This is one of the RenderingIntent enumeration values. |
| AutoPtr<Image> Celartem::ImageUtils::UniformFilter | ( | Image * | inImage, | |
| const ssize_t * | inFilter, | |||
| size_t | inDiam, | |||
| size_t | inNorm = 0 | |||
| ) |
This function creates a new Image instance that applies a filter to the specified Image instance.
| inImage | An image to apply filter on. | |
| inFilter | A filter to apply. It should be larger than diam*diam. | |
| inDiam | The diameter of the filter. | |
| inNorm | If norm is not equal to the sum of all elements in the filter, you should explicitly specify the value here; otherwise, the norm is automatically calculated. |
// sharpness is 3x3 matrix. const ssize_t sharpness[] = {0, -1, 0, -1, 5, -1, 0, -1, 0}; AutoPtr<Image> output = UniformFilter(input, sharpness, 3);