/// <summary>
            /// Removes XMP data of Jpeg2000 file and creates output file
            /// </summary> 
            public static void RemoveXMPData()
            {
                try
                {
                    //ExStart:RemoveXmpPropertiesJp2Image
                    // initialize JP2Format
                    Jp2Format jp2Format = new Jp2Format(Common.MapSourceFilePath(filePath));

                    // remove XMP package
                    jp2Format.RemoveXmpData();

                    // commit changes
                    jp2Format.Save(Common.MapDestinationFilePath(filePath));
                    //ExEnd:RemoveXmpPropertiesJp2Image
                    Console.WriteLine("File saved in destination folder.");
                }
                catch (Exception exp)
                {
                    Console.WriteLine(exp.Message);
                }
            }
            /// <summary>
            /// Updates XMP data of JP2 file and creates output file
            /// </summary> 
            public static void UpdateXMPProperties()
            {
                try
                {
                    //ExStart:UpdateXmpPropertiesJpegImage
                    // initialize JP2Format
                    Jp2Format jp2Format = new Jp2Format(Common.MapSourceFilePath(filePath));

                    // get xmp wrapper
                    XmpPacketWrapper xmpPacket = jp2Format.GetXmpData();

                    // create xmp wrapper if not exists
                    if (xmpPacket == null)
                    {
                        xmpPacket = new XmpPacketWrapper();
                    }

                    // check if DublinCore schema exists
                    if (!xmpPacket.ContainsPackage(Namespaces.DublinCore))
                    {
                        // if not - add DublinCore schema
                        xmpPacket.AddPackage(new DublinCorePackage());
                    }

                    // get DublinCore package
                    DublinCorePackage dublinCorePackage = (DublinCorePackage)xmpPacket.GetPackage(Namespaces.DublinCore);

                    string authorName = "New author";
                    string description = "New description";
                    string subject = "New subject";
                    string publisher = "New publisher";
                    string title = "New title";

                    // set author
                    dublinCorePackage.SetAuthor(authorName);
                    // set description
                    dublinCorePackage.SetDescription(description);
                    // set subject
                    dublinCorePackage.SetSubject(subject);
                    // set publisher
                    dublinCorePackage.SetPublisher(publisher);
                    // set title
                    dublinCorePackage.SetTitle(title);
                    // update XMP package
                    jp2Format.SetXmpData(xmpPacket);

                    // commit changes
                    jp2Format.Save(Common.MapDestinationFilePath(filePath));

                    //ExEnd:UpdateXmpPropertiesJP2Image
                    Console.WriteLine("File saved in destination folder.");
                }
                catch (Exception exp)
                {
                    Console.WriteLine(exp.Message);
                }
            }