Skip to content

Commit

Permalink
Test build for PR 3585
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Sep 29, 2023
1 parent 28c05e8 commit fb405c7
Show file tree
Hide file tree
Showing 3 changed files with 377 additions and 276 deletions.
4 changes: 4 additions & 0 deletions samples/NetVips.Samples/Samples/GenerateImageClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public GenerateImageClass()
// Flags
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsForeignFlags"), "Enums.ForeignFlags");
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsForeignPngFilter"), "Enums.ForeignPngFilter");
if (NetVips.AtLeastLibvips(8, 15))
{
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsForeignPreserve"), "Enums.ForeignPreserve");
}
}

/// <summary>
Expand Down
28 changes: 28 additions & 0 deletions src/NetVips/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,34 @@ public enum ForeignPngFilter
All = None | Sub | Up | Avg | Paeth // "all"
}

/// <summary>
/// Which metadata should be preserved.
/// </summary>
[Flags]
public enum ForeignPreserve
{
/// <summary>Don't attach metadata.</summary>
None = 0, // "none"

/// <summary>Preserve Exif metadata.</summary>
Exif = 1 << 0, // "exif"

/// <summary>Preserve XMP metadata.</summary>
Xmp = 1 << 1, // "xmp"

/// <summary>Preserve IPTC metadata.</summary>
Iptc = 1 << 2, // "iptc"

/// <summary>Preserve ICC metadata.</summary>
Icc = 1 << 3, // "icc"

/// <summary>Preserve other metadata (e.g. PNG comments and some TIFF tags)</summary>
Other = 1 << 4, // "other"

/// <summary>Preserve all metadata.</summary>
All = Exif | Xmp | Iptc | Icc | Other // "all"
}

/// <summary>
/// The selected encoder to use.
/// </summary>
Expand Down
Loading

0 comments on commit fb405c7

Please sign in to comment.