QPix Command Reference |
![]() ![]() |
The commands in this group perform a variety of operations on JPEG images by directly transcoding the compressed data (ie, without decompressing).
Geometric tranformations of images are usually performed in the following steps:
While this method is OK with images in lossless compression formats such as TIFF or PNG, there is a problem with lossy formats such as JPEG: recompression causes loss of quality.
The commands in this group perform simple geometric transformations on JPEG images losslessly. This is done by rearranging the compressed data, without decompressing and recompressing.
The supported lossless transformations are:
The "Mirror across upper-left to lower-right axis" transformation has no restrictions. The other transformations 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 |
Rotate 90 | * | |
Rotate 180 | * | * |
Rotate 270 | * | |
Flip horizontally | * | |
Flip vertically | * | |
Mirror across upper-left to lower-right axis | ||
Mirror across upper-right to lower-left axis | * | * |
Available options for handling this issue are:
JPEG images may contain various kinds of non-image data:
Sometimes it is necessary to strip some or all of that data from JPEG images. For example, when preparing images for web delivery deleting non-image data can reduce the file sizes significantly.
The following operations can be performed on the no-image data by transcoding:
QPx_TranscodeJPEGFile | Transcodes a JPEG file |
QPx_TranscodeJPEGBLOB | Transcodes a JPEG BLOB |