Photomatix_API_Reference.pdf

(110 KB) Pobierz
Microsoft Word - Photomatix_API_Reference.doc
Photomatix SDK - API Reference
API R EFERENCE
I - INTRODUCTION
2
II - GENERAL PARAMETER STRUCTURE
2
III - FUNCTION REFERENCE
5
III.1 - pm_combi_average
5
III.2 - pm_combi_auto
6
III.3 - pm_combi_adjust
7
III.4 - pm_combi_2images
8
III.5 - pm_hdri_generate
9
III.6 - pm_hdri_info
10
III.7 - pm_hdri_tm_basic
11
III.8 - pm_hdri_remap_ball
11
III.9 - pm_io_write_rgbe
13
III.10 - pm_io_info_rgbe
14
III.11 - pm_io_read_rgbe
15
III.12 - pm_other_align
16
Copyright Á 2003-2005 MultimediaPhoto
page 1/16
Photomatix SDK - API Reference
I - I NTRODUCTION
This document provides a description of the API (Application Programming Interface) for the
Photomatix functions stored in the Dynamic Link Library PhotomatixSDK.dll. The document is
meant to serve as reference for accessing the Photomatix functions from any application running
on the Windows platform.
The Photomatix functions are divided into four main categories.
Category
Prefix
Description
Exposure Blending pm_combi_
Combination of several differently exposed image files
into one image file
HDRI Processing
pm_hdri_
Processing on High Dynamic Range Images
I/O
pm_io_
Input/Output routines
Other
pm_other_
Other tools that do not belong to any of the three
above categories
II - G ENERAL P ARAMETER S TRUCTURE
The Photomatix functions in the Exposure Blending category share a similar structure. To avoid
lengthy repetitions, the common parameters are described in details in this section.
imageCount integer
This is the number of input image files that have to be combined via exposure blending.
outWidth integer
This is the width in pixels of the output image file, i.e. the file created after combining the
imageCount input images. There are two cases to consider:
input images have the same width
outWidth should be inferior or equal to the width
of an input image
input images are of different widths
outWidth should be inferior or equal to the
smallest of the widths of the input images
Copyright Á 2003-2005 MultimediaPhoto
page 2/16
303518170.002.png 303518170.003.png
Photomatix SDK - API Reference
outHeight integer
This is the height in pixels of the output image file, i.e. the file created after combining the
imageCount input images. There are two cases to consider:
input images have the same height
outHeight should be inferior or equal to the
height of an input image
input images are of different heights
outHeight should be inferior or equal to the
smallest of the heights of the input images
outRowStride integer
This is the number of image data contained in one row of the output image file. One
image data equals one byte for an image with 8-bit per color channel (e.g. JPEG image) and two
bytes for an image with 16-bit for per color channel. The value of outRowStride is aligned on a 4
byte boundary.
If outWidth is a multiple of 4, outRowStride = outWidth * outSpp
Otherwise, outRowStride = ( integer value of ( outWidth /4) + 1) * outSpp
outSpp integer
This is the number of samples per pixel of the output image file, i.e. the file created after
combining the imageCount input images. The number of samples per pixel is 1 for a greyscale
image, 3 for an RGB color image and 4 for an RGBA image. There are two cases to consider:
input images have the same
number of samples per pixel
outSpp should be inferior or equal to the number
of samples per pixel of an input image
input images have different
number of samples per pixel
outSpp should be inferior or equal to the number
of samples per pixel of the input images
bps integer
This is the number of bits per sample (i.e. per color channel) of the input image files. The
same value will be used for the number of bits per sample of the output image file.
inputBuffer unsigned char pointer
This parameter points to a buffer holding the bitmap data of the imageCount input
images. The bitmap data for each input image are stored one after the other in the buffer, without
any prerequisite in the order in which they are stored (i.e. you can fill the buffer in the same order
as the images are read from disk, regardless of their exposure).
One bitmap data is composed of outHeight sequences of rows. One row is composed of
outWidth pixels. One pixel is composed of outSpp * (bps/8) bytes (in RGB order for color images).
The total length of a bitmap data in number of bytes is outHeight * outWidth * outSpp * (bps/8) .
Important note: the rows of the inputBuffer should not be byte aligned (i.e no padding).
The length in bytes of an image row is outWidth * outSpp * (bps/8) and not outRowStride *
(bps/8) .
Copyright Á 2003-2005 MultimediaPhoto
page 3/16
Photomatix SDK - API Reference
resultImage unsigned char pointer
This parameter points to the image data of the output image file. The image data is
composed of outHeight sequences of rows. One row is composed of outWidth pixels aligned on 4
byte boundary. One pixel is composed of outSpp * (bps/8) bytes. The total length of a bitmap data
in number of bytes is outHeight * outRowStride * (bps/8) .
Copyright Á 2003-2005 MultimediaPhoto
page 4/16
Photomatix SDK - API Reference
III - F UNCTION R EFERENCE
III.1 - pm_combi_average
Description
Averages any number of 8- or 16-bit images and returns the result in a new bitmap.
Syntax
int pm_combi_average (int imagesCount, int outWidth, int
outHeight, int outRowStride, int outSpp, int bps, unsigned char
*inputBuffer, unsigned char *resultImage)
Parameters
Name
Format
Short description (see section II.1 for details)
imagesCount Integer
Number of input images to combine
outWidth
Integer
Width of the output image
outHeight
Integer
Height of the output image
outRowStride Integer
Length of a row of the output image
Outspp
Integer
Number of samples per pixel for the output image
Bps
Integer
Number of bits per sample (e.g. 8 for JPEG, 16 for 48-bit TIFF)
inputBuffer
Bytes
pointer
Bitmap data of all input images stored in sequence. Total length in
bytes is imagesCount * outWidth * outHeight * outSpp *( bps /8)
resultImage
Bytes
pointer
Image data of the output image. Total length in bytes is
outRowStride * outHeight *( bps /8)
Returned value
Number of rows processed.
Copyright Á 2003-2005 MultimediaPhoto
page 5/16
303518170.004.png 303518170.005.png 303518170.001.png
Zgłoś jeśli naruszono regulamin