- Aurigma Graphics Mill 5.5 for .NET
- Introduction
- What's New?
- Overview of Features
- Getting Started
- Programming with Graphics Mill for .NET
- File Formats
- Graphics Mill for .NET Add-ons
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.AjaxControls Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- AdobeResourceBlock Class
- AdobeResourceDictionary Class
- AdvancedPsdFrame Class
- AdvancedPsdReader Class
- AdvancedPsdTextFrame Class
- AsfIndexer Class
- AviAlphaTransition Class
- AviAudioManager Class
- AviCompressor Class
- AviCustomTransition Class
- AviDrawTransitionEventArgs Class
- AviDrawTransitionEventHandler Delegate
- AviDrawWatermarkEventArgs Class
- AviDrawWatermarkEventHandler Delegate
- AviEncoderOptions Class
- AviFrame Class
- AviReader Class
- AviStripesTransition Class
- AviStripesTransitionMode Enumeration
- AviTimerStyle Enumeration
- AviTransition Class
- AviWatermark Class
- AviWriter Class
- BmpEncoderOptions Class
- BmpFrame Class
- BmpReader Class
- BmpWriter Class
- CompressionType Enumeration
- CustomEncoderOptions Class
- CustomFormatReader Class
- CustomFormatReader.LoadingMode Enumeration
- CustomFormatWriter Class
- CustomFrame Class
- DisposalMethod Enumeration
- DSEncoderOptions Class
- DSFrame Class
- DSPreLoadedFrame Class
- DSReader Class
- EncoderOptions Class
- ExifDictionary Class
- ExifItemInfo Structure
- FormatManager Class
- FormatReader Class
- FormatWriter Class
- Frame Class
- GifEncoderOptions Class
- GifFrame Class
- GifReader Class
- GifWriter Class
- ID3LyricsContentType Enumeration
- ID3LyricsTimestampFormat Enumeration
- ID3SynchronisedLyrics Class
- IEncoderOptions Interface
- IFormatInfo Interface
- IFormatReader Interface
- IFormatWriter Interface
- IFrame Interface
- IFrameEnumerator Interface
- IMediaProcessorMetadataReadSupport Interface
- IMetadataReadSupport Interface
- IMetadataWriteSupport Interface
- IptcDictionary Class
- ITimeReader Interface
- ITimeWriter Interface
- IXmpDictionary Interface
- Jpeg2kEncoderOptions Class
- Jpeg2kFrame Class
- Jpeg2kProgressionOrder Enumeration
- Jpeg2kReader Class
- Jpeg2kWriter Class
- JpegAlignToSampleSizeMode Enumeration
- JpegEncoderOptions Class
- JpegFrame Class
- JpegMarkerException Class
- JpegReader Class
- JpegWriter Class
- LosslessJpegTransform Class
- MediaCorruptedException Class
- MediaFormatManager Class
- MediaProcessorMetadataDictionary Class
- MediaProviderException Class
- MediaUnsupportedException Class
- MetadataDictionary Class
- MetadataEnumerator Class
- MultiFrameException Class
- PcxEncoderOptions Class
- PcxFrame Class
- PcxReader Class
- PdfEncoderOptions Class
- PdfFrame Class
- PdfWriter Class
- PngEncoderOptions Class
- PngFrame Class
- PngReader Class
- PngWriter Class
- PreLoadedFrame Class
- PsdEncoderOptions Class
- PsdFrame Class
- PsdFrameType Enumeration
- PsdReader Class
- PsdTextJustification Enumeration
- QTEncoderOptions Class
- QTFrame Class
- QTReader Class
- SwfEncoderOptions Class
- SwfFrame Class
- SwfWriter Class
- TiffChannelType Enumeration
- TiffEncoderOptions Class
- TiffExtraChannel Class
- TiffExtraChannelCollection Class
- TiffFrame Class
- TiffReader Class
- TiffWriter Class
- WbmpEncoderOptions Class
- WbmpFrame Class
- WbmpReader Class
- WbmpWriter Class
- WMEncoderOptions Class
- WMFrame Class
- WMPreLoadedFrame Class
- WMReader 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.Drawing Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill.WebControls Namespace
- Aurigma.GraphicsMill.WinControls Namespace
- GraphicsMill Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.Math Namespace (Client Class Library)
- Aurigma.GraphicsMill.AjaxControls.VectorObjects.RedoUndo Namespace (Client Class Library)
- Samples
- Licensing
- Copyright Notices
AdobeResourceDictionary Class
This class represents a dictionary of Adobe® image resource blocks, each block is represented by the AdobeResourceBlock class.
Namespace:
Aurigma.GraphicsMill.Codecs
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
Public Class AdobeResourceDictionary _
Inherits MetadataDictionary
public class AdobeResourceDictionary : MetadataDictionary
Remarks
Adobe® applications (first of all Adobe® Photoshop®) store meta-information in so called Adobe® image resource blocks. Graphics Mill for .NET provides AdobeResourceDictionary class to facilitate work with these data.
All functionality of this class is implemented in base class MetadataDictionary. To put or get some Adobe® image resource block, you should use the Item[Object] property. Just pass ID of the Adobe® image resource block as an argument into this property. Refer Adobe® Photoshop® File Formats Specification for exact Adobe® image resource block ID values.
Instances of AdobeResourceDictionary class are used in two interfaces:
- IMetadataReadSupport - objects which implement this interface can read resource blocks from a file and retrieve them as instance of AdobeResourceDictionary class.
- IMetadataWriteSupport - objects which implement this intereface can accept instances of AdobeResourceDictionary class and encode contained resource blocks to a file. No validation of the internal structure of the binary data is performed during encoding so user is responsible for providing correctly filled AdobeResourceDictionary class instance. Files which have been saved with incorrect Adobe® image resource blocks can produce errors during opening or processing in Adobe® applications.
Examples
The code sample below demonstrates how to remove thumbnail from Adobe® image resource blocks and mark the image as copyrighted. Thumbnail block ID is 0x0409 and copyright flag ID is 0x040A.
Dim srcFileName As String = "c:/mountain.jpg"
Dim dstFileName As String = "c:/mountain2.jpg"
' Open reader on the file you need to modify metadata for
Dim reader As New Aurigma.GraphicsMill.Codecs.JpegReader(srcFileName)
Dim adobeResources As Aurigma.GraphicsMill.Codecs.AdobeResourceDictionary = reader.AdobeResources
If adobeResources Is Nothing Then
adobeResources = New Aurigma.GraphicsMill.Codecs.AdobeResourceDictionary
End If
' Create new adobe image resource block with the required metadata
Dim arBlock As New Aurigma.GraphicsMill.Codecs.AdobeResourceBlock("Copyright", New Byte() {1})
' Set this block to the item with 0x040A ID (copyright flag)
adobeResources.Item(&H40A) = arBlock
' Remove a block with 0x0409 (thumbnail data)
adobeResources.Remove(&H409)
' Write new bitmap and metadata
Dim writer As New Aurigma.GraphicsMill.Codecs.JpegWriter()
writer.Open(dstFileName)
writer.AdobeResources = adobeResources
writer.AddFrame(reader.LoadFrame(0))
writer.Close()
reader.Close()
string srcFileName = @"c:/mountain.jpg";
string dstFileName = @"c:/mountain2.jpg";
using (Aurigma.GraphicsMill.Codecs.JpegReader reader = new Aurigma.GraphicsMill.Codecs.JpegReader())
{
// Open reader on the file you need to modify metadata for
reader.Open(srcFileName);
Aurigma.GraphicsMill.Codecs.AdobeResourceDictionary adobeResources = reader.AdobeResources;
if (adobeResources == null)
{
adobeResources = new Aurigma.GraphicsMill.Codecs.AdobeResourceDictionary();
}
// Create new adobe image resource block with the required metadata
Aurigma.GraphicsMill.Codecs.AdobeResourceBlock arBlock = new
Aurigma.GraphicsMill.Codecs.AdobeResourceBlock("Copyright", new byte[] { 1 });
// Set this block to the item with 0x040A ID (copyright flag)
adobeResources[0x040A] = arBlock;
// Remove a block with 0x0409 (thumbnail data)
adobeResources.Remove(0x0409);
// Write new bitmap and metadata
using (Aurigma.GraphicsMill.Codecs.JpegWriter writer = new Aurigma.GraphicsMill.Codecs.JpegWriter())
{
writer.Open(dstFileName);
writer.AdobeResources = adobeResources;
writer.AddFrame(reader.LoadFrame(0));
}
}