- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- AdobeResourceBlock Class
- AdobeResourceDictionary Class
- BmpReader Class
- BmpSettings Class
- BmpWriter Class
- CIP4 Class
- CodecRegistry Class
- ColorBitDepth Enumeration
- CompressionType Enumeration
- CustomImageReader Class
- CustomImageWriter Class
- CustomReaderCreateCallback Delegate
- DisposalMethod Enumeration
- EpsReader Class
- EpsSettings Class
- EpsWriter Class
- ExifDictionary Class
- ExifItemInfo Class
- FileFormat Enumeration
- Frame Class
- FrameCollection(TFrame) Class
- FrameCollectionBase Class
- GifFrame Class
- GifFrameSettings Class
- GifReader Class
- GifSettings Class
- GifWriter Class
- IImageReader Interface
- IImageWriter Interface
- ImageReader Class
- ImageWriter Class
- IMetadataWriter Interface
- IptcDictionary Class
- IXmpDictionary Interface
- JpegAlignToSampleSizeMode Enumeration
- JpegMarkerException Class
- JpegReader Class
- JpegScale Enumeration
- JpegSettings Class
- JpegWriter Class
- LosslessJpeg Class
- MediaCorruptedException Class
- MediaProviderException Class
- MediaUnsupportedException Class
- MetadataDictionary Class
- MetadataEnumerator Class
- MultiFrameException Class
- OutputIntent Class
- PdfFrame Class
- PdfPage Class
- PdfReader Class
- PdfSettings Class
- PdfTextOutputMode Enumeration
- PdfVtDictionary Class
- PdfVtOptions Class
- PdfWriter Class
- PngFrame Class
- PngReader Class
- PngSettings Class
- PngWriter Class
- RawReader Class
- ResolveImageArgs Class
- ResolveImageCallback Delegate
- ResolveProfileCallback Delegate
- SmartObjectCropTo Enumeration
- SvgReader Class
- SvgReaderSettings Class
- SvgSettings Class
- SvgWriter Class
- TgaReader Class
- TgaSettings Class
- TgaWriter Class
- TiffChannelType Enumeration
- TiffExtraChannel Class
- TiffExtraChannelCollection Class
- TiffExtraChannelEntry Class
- TiffFrame Class
- TiffReader Class
- TiffSettings Class
- TiffWriter Class
- WebPFrame Class
- WebPFrameFormat Enumeration
- WebPFrameSettings Class
- WebPReader Class
- WebPSettings Class
- WebPWriter Class
- WriterSettings Class
- XmpArrayNode Class
- XmpData Class
- XmpDictionaryNode Class
- XmpLocalizedTextItemNode Class
- XmpLocalizedTextNode Class
- XmpNamespace Class
- XmpNode Class
- XmpNodeType Enumeration
- XmpStructNode Class
- XmpTagNames Class
- XmpValueNode Class
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Licensing
- End User License Agreement
- Copyright Notices
LosslessJpeg.AlignToMCUSize Method (Rectangle, JpegAlignToSampleSizeMode)
Aligns the rectangle to JPEG Minimum Coded Units (MCU).
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
public Rectangle AlignToMCUSize(
Rectangle rectangle,
JpegAlignToSampleSizeMode mode
)
Parameters
- rectangle
-
Type: System.Drawing.Rectangle
A Rectangle to align to MCU.
- mode
-
Type: Aurigma.GraphicsMill.Codecs.JpegAlignToSampleSizeMode
A JpegAlignToSampleSizeMode specifying whether to align only coordinates of the upper-left corner, or width and height also. See the Remerks section for details.
Return Value
A Rectangle aligned to MCU. It is always greater or equal than the input rectangle.Remarks
This method is used when you need overwrite some portion of JPEG image by some bitmap. Since JPEG compressed data is stored in blocks (samples) of several pixels (typically 8, 16, or other number divisible by 8), you cannot write bitmap by arbitrary coordinates. That's why you need to align coordinates by JPEG Minimum Coded Units (MCU).
If you need just to crop an image and you do not want to use it as patch for another image, you can use the Crop value. In this case the width and height of the cropping rectangle can be arbitrary.
However if you are going to put this image onto another (i.e. patch it), the width and height of this image must be aligned. In this case you should use Patch value.