/// <summary>
    /// Resizes image and clipping path
    /// </summary>
    private static void ResizeImageAndClippingPath()
    {
        using (var reader = new JpegReader("../../../../_Input/Apple.jpg"))
            using (var bitmap = reader.Frames[0].GetBitmap())
            {
                var jpegSettings = new Aurigma.GraphicsMill.Codecs.JpegSettings();
                jpegSettings.AdobeResources = reader.AdobeResources;

                bitmap.Transforms.Resize(reader.Width / 2, reader.Height / 2);

                bitmap.Save("../../../../_Output/ResizeImageAndClippingPath.jpg", jpegSettings);
            }
    }
示例#2
0
    /// <summary>
    /// Writes EXIF and IPTC metadata
    /// </summary>
    private static void WriteExifIptc()
    {
        using (var bitmap = new Aurigma.GraphicsMill.Bitmap("../../../../_Input/Chicago.jpg"))
        {
            var settings = new Aurigma.GraphicsMill.Codecs.JpegSettings(70);

            var exif = new Aurigma.GraphicsMill.Codecs.ExifDictionary();
            exif[Aurigma.GraphicsMill.Codecs.ExifDictionary.Software] = "Aurigma Graphics Mill";
            settings.Exif = exif;

            var iptc = new Aurigma.GraphicsMill.Codecs.IptcDictionary();
            iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Keyword] = "mountain";
            iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.City]    = "Olympia";
            settings.Iptc = iptc;

            bitmap.Save("../../../../_Output/WriteExifIptc.jpg", settings);
        }
    }