Compression

View as Markdown

Adobe ResourcesAdvancedArt TextBackground RemovalBitmapBMPBranched PipelineChannelsClipping PathsCodecsColor AdjustmentColor ConversionColor ManagementColor ProfileCompressionCropDrawingEPSEXIFExtra ChannelsFilesystemFontFormat ConversionFormatted TextGIFGradientGraphics ContainerGreen ScreenImage ValidationIndexed formatInteroperabilityIPTCJPGLossless JPEGMetadataModify ContainerMultiple framesPathPDFPersonalizationPipelinePixel AccessPNGPSDPSD ProcessorRasterizationRAWReadResizeRotateSpot ColorStreamSVGTextText LayoutTGAThumbnailTIFFTransformTransparentizeVDPVignetteWatermarkWEBPWPFWriteXMP

Compare Image Format Compressions

Compares compression of WebP, JPEG and PNG image formats.

Place JPEG photos into a PDF without recompression

This sample shows how to put JPEG photos into a PDF quickly and with little memory by storing their original compressed data in the file as is. An image loaded with CompressedImage.CreateFromFile keeps its encoded bytes, and Graphics.DrawImage writes them to the PDF without decoding and compressing them again: the photos are never held in memory as pixels, no time is spent on JPEG decoding and encoding, and there is no second JPEG quality loss. RGB and CMYK JPEG files are both kept as is. For comparison, the sample writes the same photos to a JPEG-compressed PDF once more from decoded Bitmap objects and prints how long each way takes.

Write WebP Lossy And Lossless

Writes image in WebP lossy and lossless format.