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
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- aspose-imaging-examplesAGENTS.md
- conversionAGENTS.md
- convert-apngAGENTS.md
- convert-cdrAGENTS.md
- convert-dicom-imagesAGENTS.md
- convert-eps-imagesAGENTS.md
- converting-wmf-and-emfAGENTS.md
- convert-open-document-graphicsAGENTS.md
- convert-raster-imageAGENTS.md
- convert-svg-to-raster-imagesAGENTS.md
- convert-webp-imagesAGENTS.md
- image-and-photo-filtersAGENTS.md
- kernel-filtersAGENTS.md
- manipulate-different-image-file-formatsAGENTS.md
- manipulating-imagesAGENTS.md
- merge-imagesAGENTS.md
- working-with-drawing-imagesAGENTS.md
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
- Very specific: line 178
Use Image.RotateFlip(RotateFlipType.Rotate90FlipNone) on the loaded CmxImage, then save the result with TiffOptions.
- Very specific: line 181
Create a JpegOptions object, set its Quality property to 90, and pass it to image.Save(outputPath, jpegOptions).
- Very specific: line 190
Create TiffOptions, add a TiffTag for ImageDescription to its CustomTags collection, and save the CMX image with those options.
≈ “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.
Files
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-specificusing Aspose.Imaging.ImageOptions;(31/34 files) ← category-specificusing Aspose.Imaging.FileFormats.Cmx;(22/34 files) ← category-specificusing Aspose.Imaging.FileFormats.Tiff.Enums;(12/34 files) ← category-specificusing Aspose.Imaging.Sources;(8/34 files) ← category-specificusing Aspose.Imaging.FileFormats.Tiff;(5/34 files) ← category-specificusing Aspose.Imaging.FileFormats.Jpeg;(5/34 files) ← category-specificusing Aspose.Imaging.ImageLoadOptions;(5/34 files) ← category-specificusing Aspose.Imaging.FileFormats.Pdf;(4/34 files) ← category-specificusing Aspose.Imaging.FileFormats.Png;(2/34 files) ← category-specificusing 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
| File | Key APIs | Description |
| load-a-cmx-file-from-a-local-path-using-the-image-load-method.cs | CmxImage | Load 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.cs | Detect 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.cs | TiffOptions | Convert 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.cs | CmxImage, PngOptions, RasterImage | Convert 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.cs | CmxImage, PngOptions, RasterImage | Convert 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.cs | TiffOptions, VectorRasterizationOptions | Convert 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.cs | JpegOptions | Convert 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.cs | CmxLoadOptions, JpegOptions | Convert 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.cs | CmxImage, CmxRasterizationOptions, PdfOptions | Convert 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.cs | CmxLoadOptions, CmxRasterizationOptions, PdfOptions | Convert 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.cs | TiffOptions | Save converted TIFF images with LZW compression and verify file size reduction. |
| save-converted-tiff-images-with-ccitt-group-4-compression-for-monochrome-output.cs | TiffOptions | Save converted TIFF images with CCITT Group 4 compression for monochrome output. |
| set-dpi-of-output-jpeg-image-to-300-using-jpegoptions-resolutionx-and-resolutiony.cs | JpegOptions | Set 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.cs | CmxImage, CmxRasterizationOptions, PdfOptions | Preserve 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.cs | CmxImage, TiffOptions | Convert 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.cs | CmxImage, CmxRasterizationOptions, JpegOptions | Convert 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.cs | CmxImage, TiffOptions | Use 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.cs | PdfOptions | Convert 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.cs | CmxImage, JpegOptions | Implement 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.cs | CmxImage, CmxLoadOptions | Create 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.cs | PngOptions | Validate 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.cs | CmxImage, PngOptions | Generate 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.cs | CmxImage, TiffOptions | Apply 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.cs | CmxImage, PdfOptions, VectorRasterizationOptions | Convert 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.cs | CmxImage, CmxRasterizationOptions, JpegOptions | Convert CMX to single‑page PDF by flattening all pages onto one page. |
| use-imageoptions-to-set-color-profile-for-tiff-output-during-cmx-conversion.cs | TiffOptions | Use ImageOptions to set color profile for TIFF output during CMX conversion. |
| convert-cmx-to-jpeg-with-exif-orientation-tag-preserved-from-source-image.cs | JpegOptions | Convert CMX to JPEG with EXIF orientation tag preserved from source image. |
| implement-logging-of-conversion-parameters-using-nlog-for-each-cmx-conversion-operation.cs | PngOptions | Implement 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.cs | MultiPageOptions, TiffOptions, VectorRasterizationOptions | Write 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.cs | PdfOptions | Write integration tests for batch conversion of CMX files to PDF in parallel thr... |
| ...and 4 more files | View all |
Category Statistics
- Total examples: 34
- Failed: 0
- Pass rate: 100.0%
Key API Surface
BmpOptionsCmxImageCmxLoadOptionsCmxRasterizationOptionsEmfOptionsGifOptionsGraphicsJpegImageJpegOptionsLoadOptionsMultiPageOptionsPdfOptionsPngImagePngOptionsRasterImageTiffFrameTiffImageTiffOptionsVectorRasterizationOptions
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 staticLoadmethod 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 asQuality.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 withRotateFlipto define rotation/orientation.image.RotateFlip(...)— method (inherited fromImage) that rotates or flips the image according to aRotateFlipType.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| Resource | Link |
| 📖 Documentation | docs.aspose.com/imaging/net |
| 📦 NuGet Package | nuget.org/packages/Aspose.Imaging |
| 🚀 Release Notes | releases.aspose.com/imaging/net |
| 🌐 Online Apps | products.aspose.app/imaging |
| 🔑 Free Temporary License | purchase.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
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
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.

