JPG
View as MarkdownCompare Image Format Compressions
Compares compression of WebP, JPEG and PNG image formats.
Convert And Write JPEG
Converts to PixelFormat.Format24bppRgb to and saves to JPEG format.
Crop Jpeg Losslessly
Crops JPEG image losslessly.
Flip Jpeg Losslessly
Flips JPEG image losslessly.
Load Multiframe Image
Loads multiframe image.
Load Save Stream
Loads and saves image to stream.
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.
Read and Write JPEG
Reads and writes image in JPEG format.
Read Image Metadata
Reads image metadata without loading bitmap data.
Read RAW Image
Reads RAW image.
Recompress JPEG partially
Applies mosaic effect on region of image with partial JPEG recompression.
Resize while reading JPEG
Demonstrates how to resize a JPEG image using the codec's resize capability.
Rotate JPEG losslessly
Rotates JPEG image losslessly.
Save Vector Content To JPEG
Reads vector content from the specified PDF file, rasterizes it, and saves it in JPEG format.
Update JPEG metadata losslessly
Updates metadata of JPEG image without recompression.
Write bitmap to EPS
Saves bitmap to EPS format.
Write Bitmap To PDF Memory Friendly
Saved bitmap to PDF format using memory-friendly Pipeline API.
Write PNG Image
Reads image in JPEG format and saves to PNG format.
Write TGA
Reads an image in JPEG format, flips it vertically, and saves it in TARGA format.
Write TIFF
Loads a JPEG image and converts it to TIFF format.
Write WebP
Reads image in JPEG format and saves to WebP format.
Write WebP Lossy And Lossless
Writes image in WebP lossy and lossless format.