ImageGear supports the following modes for saving JPEG compressed DICOM images:
JPEG Lossy Baseline or Extended
This is the default mode for saving DICOM images with JPEG compression in ImageGear. In this mode:
- ImageGear saves grayscale images as either 8 bits per pixel, using "JPEG Baseline (Process 1)" transfer syntax, or as 9..12 bits per pixel, using "JPEG Extended (Process 2 & 4)" transfer syntax.
- ImageGear saves RGB images as 24 bits per pixel, using "JPEG Baseline (Process 1)" transfer syntax.
If the source image colorspace is different from RGB or grayscale, or the bit depth is greater, ImageGear automatically converts image rasters to one of the supported pixel formats on saving. See Saving for more details.
As part of JPEG Lossy compression process, ImageGear converts RGB rasters into YCbCr colorspace (or YCC in DICOM terminology) during saving. This conversion is fully encapsulated into the ImageGear JPEG codec; the application should not convert images to YCbCr before saving them to JPEG or DICOM JPEG.
Use one of these ways to save an image as DICOM JPEG Baseline or Extended:
JPEG Lossy Baseline Only
This mode provides compatibility with viewers that do not support JPEG Extended coding process (12-bit images). In this mode:
- ImageGear saves grayscale images as 8 bits per pixel, using "JPEG Baseline (Process 1)" transfer syntax.
- ImageGear saves RGB images as 24 bits per pixel, using "JPEG Baseline (Process 1)" transfer syntax.
If the source image colorspace is different from RGB or grayscale, or the bit depth is greater, ImageGear automatically converts image rasters to one of the supported pixel formats on saving. See Saving for more details.
As part of the JPEG Lossy compression process, ImageGear converts RGB rasters into YCbCr colorspace (or YCC in DICOM terminology) during saving. This conversion is fully encapsulated into the ImageGear JPEG codec; the application should not convert images to YCbCr before saving them to JPEG or DICOM JPEG.
To save an image as DICOM JPEG Baseline, use ImGearSavingFormats Enumeration.DICOM saving format, and set SaveSyntax to ImGearDICOMTransferSyntaxes.JPEG_BASELINE_PR_1.
JPEG Lossless
In this mode:
- ImageGear saves grayscale images as 8…16 bits per pixel, using "JPEG Lossless, Non-Hierarchical (Process 14)" transfer syntax.
- ImageGear saves RGB images as 24 bits per pixel, using "JPEG Lossless, Non-Hierarchical (Process 14)" transfer syntax.
JPEG Lossless compression does not involve internal conversion or RGB rasters into YCbCr colorspace (YCC in DICOM terminology).
To save an image as DICOM JPEG Lossless, use ImGearSavingFormats Enumeration.DICOM saving format, and set SaveSyntax to ImGearDICOMTransferSyntaxes.JPEG_LOSSLESS or ImGearDICOMTransferSyntaxes.JPEG_LOSSLESS_NONH_PR_14.