QPx_TranscodeJPEGBLOB(inputData; inputData; inputData; inputData; inputData):error
inputData BLOB Input JPEG BLOB
outputData BLOB Output JPEG BLOB
transformationType Longint Geometric transformation
mcuHandling Longint MCU handling
markerHandling Longint Handling of non-image data
error Longint Error result

Transcode a JPEG BLOB

Parameter inputData holds the input data and the transcoded JPEG is received by outputData.

Parameter transformationType specifies the geometric transformation to perform on the image data. Transformations are defined by the following constants:

qpx_JPEGTransformNone 0 Do not transform
qpx_JPEGFlipHorz 1 Flip horizontally
qpx_JPEGFlipVert 2 Flip vertically
qpx_JPEGMirrorAcrossUL2LRAxis 3 Mirror across upper-left to lower-right axis
qpx_JPEGMirrorAcrossUR2LLAxis 4 Mirror across upper-right to lower-left axis
qpx_JPEGRotate90 5 Rotate 90
qpx_JPEGRotate180 6 Rotate 180
qpx_JPEGRotate270 7 Rotate 270

All transformations except qpx_JPEGMirrorAcrossUL2LRAxis may be affected if the image dimensions are not a multiple of the MCU size (8 pixels for grayscale, 16 pixels for color images). Because only complete blocks of data can be transformed, some transformations may leave untransformed blocks at the edges.

The following table summarizes the effects of non-MCU-multiple image dimensions for each available transformation. A ★ indicates that the specific transformation will cause "edge effects".

Transformation (width % MCU) # 0 (height % MCU) # 0

Parameter mcuHandling specifies how to handle this issue. Available options are:

qpx_JPEGIgnorePartialMCUs 0 Ignore untransformed blocks at the edges
qpx_JPEGTrimPartialMCUs 1 Trim images with odd dimensions
qpx_JPEGProhibitPartialMCUs 2 Transform only even-size images

Parameter markerHandling specifies how to treat the non-image data of the input JPEG. It can be one of the following constants:

qpx_JPEGCopyAllMarkers 0 Copy all non-image data
qpx_JPEGCopyCommentsOnly 1 Copy comments only
qpx_JPEGCopyNoMarkers 2 Do not copy non-image data

Related commands

QPx_TranscodeJPEGFile Transcode a JPEG file