<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="jit.openexr" module="jit" category="Jitter Utilities">
	<digest>
		Read or write an OpenEXR image.
	</digest>
	<description>
		Converts an OpenEXR image to and from a <o>jit.matrix</o> object for an arbitrary number of planes or color components.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
		<metadata name="tag">
			Jitter Utilities
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="matrix">
			<digest>
				in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="matrix">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="matrix">
			<digest>
				out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="matrix">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MOP-->
	<mop matrixinputcount="1" matrixoutputcount="1">
		<matrixoutput name="out" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="32" mindimcount="1" maxdimcount="2">
			<types>
				char long float32 float64
			</types>
		</matrixoutput>
	</mop>
	<!--MESSAGES-->
	<methodlist>
		<method name="read">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
			</arglist>
			<digest>
				Read afile into a <o>jit.matrix</o> object
			</digest>
			<description>
				Reads the given file into a <o>jit.matrix</o> using the indicated channels listed in the channel attribute.
			</description>
		</method>
		<method name="write">
			<arglist>
				<arg name="filename" optional="1" type="symbol" />
			</arglist>
			<digest>
				Write the current <o>jit.matrix</o> to disk as an OpenEXR image file
			</digest>
			<description>
				Writes the current <o>jit.matrix</o> to disk as an OpenEXR image file using the indicated channels listed in the channel attribute.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="clear" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="importattrs" />
		<jittermethod name="outputmatrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="adjust" get="1" set="1" type="int" size="1">
			<digest>
				HDR image adjustment flag
			</digest>
			<description>
				Flag to enable or disable adjusting the HDR image data through ILM's proposed display mapping pipeline (default = 0). When enabled, the exposure, defog, kneehigh, kneelow, and normalize attributes can be used to control the following display mapping process:
				<br />
				<br />
				1. Compensate for fogging by subtracting defog from the raw pixel values.
				<br />
				2. Multiply the defogged pixel values by 2(exposure + 2.47393).
				<br />
				3. Values, which are now 1.0, are called &quot;middle gray.&quot; If defog and exposure are both set to 0.0, then middle gray corresponds to a raw pixel value of 0.18. In step 6, middle gray values will be mapped to an intensity 3.5 f-stops below the display's maximum intensity.
				<br />
				4. Apply a knee function. The knee function has two parameters, kneeLow and kneeHigh. Pixel values below 2kneeLow are not changed by the knee function. Pixel values above kneeLow are lowered according to a logarithmic curve, such that the value 2kneeHigh is mapped to 23.5 (in step 6, this value will be mapped to the display's maximum intensity).
				<br />
				5. Gamma-correct the pixel values.
				<br />
				6. Scale the values such that middle gray pixels are mapped to 84.66 (or 3.5 f-stops below the display's maximum intensity).
				<br />
				7. If converting to 8 bit unsigned integer values (char), clamp the values to [0, 255].
				<br />
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Adjust" />
			</attributelist>
		</attribute>
		<attribute name="channels" get="1" set="1" type="symbol" size="32">
			<digest>
				List of channel names to use
			</digest>
			<description>
				The list of channel names to use. When reading an OpenEXR file into a <o>jit.matrix</o> object, these channels will be mapped to sequential planes. If a channel does not exist it will be filled with zeros. When writing a <o>jit.matrix</o> object, the names listed in this list will be used to name each plane as they are stored in the OpenEXR file. (default = null)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Channels" />
			</attributelist>
		</attribute>
		<attribute name="defog" get="1" set="1" type="float" size="1">
			<digest>
				Defog offset
			</digest>
			<description>
				Value subtracted from pixel values to compensate for fogging due to stray light in the recording device (default = 0.0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Defog" />
			</attributelist>
		</attribute>
		<attribute name="exposure" get="1" set="1" type="float" size="1">
			<digest>
				Apparent image exposure on the display
			</digest>
			<description>
				Sets the apparent exposure of the image on the display. It lightens or darkens the displayed image, allowing you to reveal detail in the high or low end. (default = 0.0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Exposure" />
			</attributelist>
		</attribute>
		<attribute name="gamma" get="1" set="1" type="float" size="1">
			<digest>
				Gamma correction coefficient
			</digest>
			<description>
				Coefficient to use for gamma correcting the pixel values (default = 2.2)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Gamma" />
			</attributelist>
		</attribute>
		<attribute name="kneehigh" get="1" set="1" type="float" size="1">
			<digest>
				Knee high value for white level
			</digest>
			<description>
				Pixel values between kneeHigh and kneeLow set the white level of the displayed image, determining which value is mapped to the maximum intensity of the monitor (default = 3.5)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Knee High" />
			</attributelist>
		</attribute>
		<attribute name="kneelow" get="1" set="1" type="float" size="1">
			<digest>
				Knee low value for white level
			</digest>
			<description>
				Pixel values between kneehigh and kneelow set the white level of the displayed image, determining which value is mapped to the maximum intensity of the monitor (default = 0.0).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Knee Low" />
			</attributelist>
		</attribute>
		<attribute name="normalize" get="1" set="1" type="int" size="1">
			<digest>
				Floating point normalization flag
			</digest>
			<description>
				Flag to enable or disable normalization for rempping the floating point data into a uniform range of 0-1. This operation will be performed before the display mapping process. (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Normalize" />
			</attributelist>
		</attribute>
		<attribute name="verbose" get="1" set="1" type="int" size="1">
			<digest>
				Toggle printing to the Max Console
			</digest>
			<description>
				Toggles the printing of information to Max Console.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Verbose" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="outputmode" />
		<jitterattribute name="adapt" />
		<jitterattribute name="out_name" />
		<jitterattribute name="type" />
		<jitterattribute name="dim" />
		<jitterattribute name="planecount" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jit.openexr.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.matrix" />
		<seealso name="jit.bfg" />
	</seealsolist>
	<discussion>
		OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light and Magic for use in computer imaging applications.
		<br />
		The <o>jit.openexr</o> object supports 16-bit unsigned integer as well as 16-bit (aka &quot;half&quot;) and 32-bit floating-point color component values. Half values have 1 sign bit, 5 exponent bits, and 10 mantissa bits. For linear images, this format provides 1024 (210) values per color component per f-stop, and 30 f-stops (25 - 2), with an additional 10 f-stops with reduced precision at the low end (denormals). The half format supports denormalized numbers, positive and negative infinities, and NaNs. It is identical to the half data type in NVIDIA's Cg graphics language.
		<br />
		When converted to or from a <o>jit.matrix</o> object, half values get promoted to 32 bit floating-point values (float32), 16-bit integer values get converted to 8-bit unsigned char, 64 bit floating-point values get converted to 32 bit, and 32 bit integer values get converted to 16 bit unsigned.
		<br />
		OpenEXR also supports several lossless compression methods (PIZ, ZIP, RLE), which can achieve compression ratios of about 2:1 for images with film grain.
		<br />
	</discussion>
</c74object>
