Пример #1
0
	public void SetXmp (XmpFile xmp)
	{
		using (MemoryStream stream = new MemoryStream ()) {
			
			XmpSignature.WriteName (stream);
			xmp.Save (stream);
			
			Marker xmp_marker = new Marker (XmpSignature.Id, stream.ToArray ());
			Replace (XmpSignature, xmp_marker);
		}
	}
Пример #2
0
		public void Dump ()
		{
#if enable_debug
			XmpFile xmp = new XmpFile ();
			xmp.Store = this;
			xmp.Save (System.Console.OpenStandardOutput ());
#endif
		}
Пример #3
0
        public void SetXmp(XmpFile xmp)
        {
            TextChunk text = null;

            text = Header.LookupTextChunk ("XML:com.adobe.xmp");
            if (text != null)
                Chunks.Remove (text);

            text = Header.LookupTextChunk ("XMP");
            if (text != null)
                Chunks.Remove (text);

            ItxtChunk itext = new ItxtChunk ("XML:com.adobe.xmp", "en", false);
            using (MemoryStream stream = new MemoryStream ()) {
                xmp.Save (stream);
                itext.SetText (stream.ToArray ());
            }
            Header.Insert (itext);
        }