agentleFS
aspose-imagingaspose-imaging/agentic-net-examples/convert-cmx-images/agents.md

agentic-net-examples / convert-cmx-images

AGENTS.md1 starsChanged 7 months agoMITView on GitHub

C# examples for Convert CMX Images using Aspose.Imaging for .NET

The file

We split this agents.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use Image.RotateFlip(RotateFlipType.Rotate90FlipNone) on the loaded CmxImage, then save the result with TiffOptions.

    line 178
  2. Very specific:

    Create a JpegOptions object, set its Quality property to 90, and pass it to image.Save(outputPath, jpegOptions).

    line 181
  3. Very specific:

    Create TiffOptions, add a TiffTag for ImageDescription to its CustomTags collection, and save the CMX image with those options.

    line 190

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
agents.md

AGENTS - Convert CMX Images

Persona

You are a C# developer specializing in image processing using Aspose.Imaging for .NET, working within the Convert CMX Images category. This folder contains standalone C# examples for Convert CMX Images operations. See the root agents.md for repository-wide conventions and boundaries.

Required Namespaces

  • using System; (34/34 files)
  • using System.IO; (34/34 files)
  • using Aspose.Imaging; (32/34 files) ← category-specific
  • using Aspose.Imaging.ImageOptions; (31/34 files) ← category-specific
  • using Aspose.Imaging.FileFormats.Cmx; (22/34 files) ← category-specific
  • using Aspose.Imaging.FileFormats.Tiff.Enums; (12/34 files) ← category-specific
  • using Aspose.Imaging.Sources; (8/34 files) ← category-specific
  • using Aspose.Imaging.FileFormats.Tiff; (5/34 files) ← category-specific
  • using Aspose.Imaging.FileFormats.Jpeg; (5/34 files) ← category-specific
  • using Aspose.Imaging.ImageLoadOptions; (5/34 files) ← category-specific
  • using Aspose.Imaging.FileFormats.Pdf; (4/34 files) ← category-specific
  • using Aspose.Imaging.FileFormats.Png; (2/34 files) ← category-specific
  • using System.Net; (1/34 files)
  • using System.Threading.Tasks; (1/34 files)
  • using System.Collections.Generic; (1/34 files)
  • using System.Text.Json; (1/34 files)

Files in this folder

FileKey APIsDescription
load-a-cmx-file-from-a-local-path-using-the-image-load-method.csCmxImageLoad a CMX file from a local path using the Image.Load method.
detect-whether-the-loaded-cmx-image-contains-multiple-pages-using-the-image-ismultipage-property.csDetect whether the loaded CMX image contains multiple pages using the Image.IsMu...
convert-a-single-page-cmx-image-to-a-single-page-tiff-file-with-default-compression.csTiffOptionsConvert a single‑page CMX image to a single‑page TIFF file with default compress...
convert-a-single-page-cmx-image-to-a-multi-page-tiff-file-by-adding-blank-pages.csCmxImage, PngOptions, RasterImageConvert a single‑page CMX image to a multi‑page TIFF file by adding blank pages.
convert-a-multi-page-cmx-image-to-a-single-page-tiff-file-by-merging-pages.csCmxImage, PngOptions, RasterImageConvert a multi‑page CMX image to a single‑page TIFF file by merging pages.
convert-a-multi-page-cmx-image-to-a-multi-page-tiff-file-preserving-original-page-order.csTiffOptions, VectorRasterizationOptionsConvert a multi‑page CMX image to a multi‑page TIFF file preserving original pag...
convert-a-cmx-image-to-jpeg-format-with-quality-set-to-90-using-jpegoptions.csJpegOptionsConvert a CMX image to JPEG format with quality set to 90 using JpegOptions.
convert-a-cmx-image-to-jpeg-format-with-progressive-encoding-enabled-for-smoother-loading.csCmxLoadOptions, JpegOptionsConvert a CMX image to JPEG format with progressive encoding enabled for smoothe...
convert-a-cmx-image-to-pdf-format-with-a4-page-size-using-pdfoptions.csCmxImage, CmxRasterizationOptions, PdfOptionsConvert a CMX image to PDF format with A4 page size using PdfOptions.
convert-a-cmx-image-to-pdf-format-embedding-fonts-as-subsets-for-smaller-files.csCmxLoadOptions, CmxRasterizationOptions, PdfOptionsConvert a CMX image to PDF format embedding fonts as subsets for smaller files.
save-converted-tiff-images-with-lzw-compression-and-verify-file-size-reduction.csTiffOptionsSave converted TIFF images with LZW compression and verify file size reduction.
save-converted-tiff-images-with-ccitt-group-4-compression-for-monochrome-output.csTiffOptionsSave converted TIFF images with CCITT Group 4 compression for monochrome output.
set-dpi-of-output-jpeg-image-to-300-using-jpegoptions-resolutionx-and-resolutiony.csJpegOptionsSet DPI of output JPEG image to 300 using JpegOptions.ResolutionX and Resolution...
preserve-cmx-metadata-when-converting-to-pdf-by-copying-imageproperties-to-the-pdf-document.csCmxImage, CmxRasterizationOptions, PdfOptionsPreserve CMX metadata when converting to PDF by copying ImageProperties to the P...
convert-cmx-to-tiff-with-custom-color-depth-of-8-bits-per-pixel.csCmxImage, TiffOptionsConvert CMX to TIFF with custom color depth of 8 bits per pixel.
convert-cmx-to-jpeg-with-custom-background-color-for-transparent-regions-to-avoid-artifacts.csCmxImage, CmxRasterizationOptions, JpegOptionsConvert CMX to JPEG with custom background color for transparent regions to avoi...
use-aspose-imaging-to-convert-cmx-stream-from-memory-to-tiff-without-temporary-files.csCmxImage, TiffOptionsUse Aspose.Imaging to convert CMX stream from memory to TIFF without temporary f...
convert-cmx-image-loaded-from-a-network-stream-to-pdf-and-write-to-response-stream.csPdfOptionsConvert CMX image loaded from a network stream to PDF and write to response stre...
implement-asynchronous-conversion-of-cmx-to-jpeg-using-async-await-pattern-for-non-blocking-ui.csCmxImage, JpegOptionsImplement asynchronous conversion of CMX to JPEG using async/await pattern for n...
create-a-console-application-that-accepts-input-cmx-path-and-output-format-as-arguments.csCmxImage, CmxLoadOptionsCreate a console application that accepts input CMX path and output format as ar...
validate-that-output-file-size-does-not-exceed-a-specified-limit-after-conversion.csPngOptionsValidate that output file size does not exceed a specified limit after conversio...
generate-a-thumbnail-of-a-cmx-image-before-conversion-using-image-resize-for-preview.csCmxImage, PngOptionsGenerate a thumbnail of a CMX image before conversion using Image.Resize for pre...
apply-rotation-to-cmx-image-before-converting-to-tiff-using-image-rotateflip-to-correct-orientation.csCmxImage, TiffOptionsApply rotation to CMX image before converting to TIFF using Image.RotateFlip to ...
convert-cmx-to-multi-page-pdf-where-each-cmx-page-becomes-a-separate-pdf-page.csCmxImage, PdfOptions, VectorRasterizationOptionsConvert CMX to multi‑page PDF where each CMX page becomes a separate PDF page.
convert-cmx-to-single-page-pdf-by-flattening-all-pages-onto-one-page.csCmxImage, CmxRasterizationOptions, JpegOptionsConvert CMX to single‑page PDF by flattening all pages onto one page.
use-imageoptions-to-set-color-profile-for-tiff-output-during-cmx-conversion.csTiffOptionsUse ImageOptions to set color profile for TIFF output during CMX conversion.
convert-cmx-to-jpeg-with-exif-orientation-tag-preserved-from-source-image.csJpegOptionsConvert CMX to JPEG with EXIF orientation tag preserved from source image.
implement-logging-of-conversion-parameters-using-nlog-for-each-cmx-conversion-operation.csPngOptionsImplement logging of conversion parameters using NLog for each CMX conversion op...
write-unit-tests-for-cmx-to-tiff-conversion-covering-single-page-and-multi-page-scenarios.csMultiPageOptions, TiffOptions, VectorRasterizationOptionsWrite unit tests for CMX to TIFF conversion covering single‑page and multi‑page ...
write-integration-tests-for-batch-conversion-of-cmx-files-to-pdf-in-parallel-threads.csPdfOptionsWrite integration tests for batch conversion of CMX files to PDF in parallel thr...
...and 4 more filesView all

Category Statistics

  • Total examples: 34
  • Failed: 0
  • Pass rate: 100.0%

Key API Surface

  • BmpOptions
  • CmxImage
  • CmxLoadOptions
  • CmxRasterizationOptions
  • EmfOptions
  • GifOptions
  • Graphics
  • JpegImage
  • JpegOptions
  • LoadOptions
  • MultiPageOptions
  • PdfOptions
  • PngImage
  • PngOptions
  • RasterImage
  • TiffFrame
  • TiffImage
  • TiffOptions
  • VectorRasterizationOptions

Failed Tasks

All tasks passed ✅

Use Cases

  • A desktop application needs to batch‑convert legacy Corel Metafile C# files into PNG for web publishing, and the CMX image conversion examples show how to automate this workflow.
  • An e‑learning platform receives course assets in CMX format; using the provided code you can programmatically transform them into high‑resolution JPEGs for mobile devices.
  • A print‑shop integration requires converting CMX drawings to PDF while preserving vector data, and the sample demonstrates the necessary Corel Metafile C# steps.
  • A migration script must extract thumbnails from a collection of CMX files to populate a searchable catalog; the examples illustrate how to generate and save these thumbnails efficiently.
  • An IoT device captures screen data as CMX metafiles; the code snippets enable on‑the‑fly conversion to BMP for downstream image analysis pipelines.

Related Categories

The techniques used for CMX image conversion often overlap with other raster‑to‑vector transformations found in the repository, such as converting BMP or TIFF files to modern formats. Developers working with Corel Metafile C# may also benefit from the Convert SVG Images and Convert PDF Images sections, which share similar option handling and stream management patterns. Exploring these adjacent categories can provide a broader toolkit for handling diverse image formats within Aspose.Imaging for .NET.

Operations Covered

  • Rotate CMX image 90° before conversion
  • Convert CMX image to TIFF format
  • Convert CMX image to JPEG with specific quality
  • Preserve EXIF orientation when converting CMX to JPEG
  • Convert CMX image to PDF with A4 page size
  • Merge multi‑page CMX into a single‑page TIFF
  • Apply default TIFF compression during conversion
  • Load CMX image from file system

Supported Formats

  • CMX – source vector image format used as input
  • TIFF – target format for raster conversion and compression
  • JPEG – target format for raster conversion with quality settings
  • PDF – target format when exporting CMX with page‑size options
  • PNG – referenced in the multi‑page merge example (library import)

API Classes Used

  • Aspose.Imaging.Image — base class that provides static Load method to open images.
  • Aspose.Imaging.FileFormats.Cmx.CmxImage — represents a CMX image; used for loading and processing CMX files.
  • Aspose.Imaging.ImageOptions.JpegOptions — holds JPEG‑specific settings such as Quality.
  • Aspose.Imaging.ImageOptions.PdfOptions — holds PDF‑specific settings like page size.
  • Aspose.Imaging.ImageOptions.TiffOptions — holds TIFF‑specific settings such as compression type.
  • Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompression — enumeration used to specify the compression algorithm for TIFF output.
  • Aspose.Imaging.FileFormats.Tiff.Enums.RotateFlipType — enumeration used with RotateFlip to define rotation/orientation.
  • image.RotateFlip(...) — method (inherited from Image) that rotates or flips the image according to a RotateFlipType.
  • image.Save(outputPath, options) — saves the processed image to the specified path using the provided format‑specific options.

Related Resources

  • See also: Convert CDR

Get Started

Ready to try Convert Cmx Images conversions on your own files with Aspose.Imaging for .NET?

dotnet add package Aspose.Imaging
ResourceLink
📖 Documentationdocs.aspose.com/imaging/net
📦 NuGet Packagenuget.org/packages/Aspose.Imaging
🚀 Release Notesreleases.aspose.com/imaging/net
🌐 Online Appsproducts.aspose.app/imaging
🔑 Free Temporary Licensepurchase.aspose.com/temporary-license
🤝 Consulting (paid implementation help)consulting.aspose.com
<!-- AUTOGENERATED:START -->

Updated: 2026-09-16 | Run: 20260806_142349 | Examples: 34

<!-- AUTOGENERATED:END -->

Developer Q&A

Q: How do I rotate a CMX image 90° before converting it to TIFF in C#?

Use Image.RotateFlip(RotateFlipType.Rotate90FlipNone) on the loaded CmxImage, then save the result with TiffOptions. → See: apply-rotation-to-cmx-image-before-converting-to-tiff-using-image-rotateflip-to-correct-orientation.cs

Q: How can I set JPEG quality to 90 when converting a CMX file with Aspose.Imaging?

Create a JpegOptions object, set its Quality property to 90, and pass it to image.Save(outputPath, jpegOptions). → See: convert-a-cmx-image-to-jpeg-format-with-quality-set-to-90-using-jpegoptions.cs

Q: How do I merge all pages of a multi‑page CMX into a single‑page TIFF using Aspose.Imaging for .NET?

Load the CmxImage, iterate its pages, add each as a TiffFrame to a new TiffImage, and then save the combined image. → See: convert-a-multi-page-cmx-image-to-a-single-page-tiff-file-by-merging-pages.cs

Q: How can I preserve the EXIF orientation tag when converting a CMX to JPEG in C#?

Load the CMX with ImageLoadOptions where PreserveExifData = true, then save it as JPEG; the orientation tag is retained automatically. → See: convert-cmx-to-jpeg-with-exif-orientation-tag-preserved-from-source-image.cs

Q: How do I embed a custom ImageDescription tag into a TIFF generated from a CMX file?

Create TiffOptions, add a TiffTag for ImageDescription to its CustomTags collection, and save the CMX image with those options. → See: convert-cmx-to-tiff-using-a-custom-image-encoder-to-embed-custom-tags.cs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.