Skip to content

Commit

Permalink
fix some resources
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWandererProductions committed Nov 19, 2024
1 parent af9b26b commit bbd848f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Imaging/ImageGifHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ private static void GifCreator(IEnumerable<FrameInfo> frames, string target)
frameInfo.Image.Height * frameInfo.Image.Width * 4, // Image byte size
frameInfo.Image.Width * 4)); // Bytes per row

var metadata = new BitmapMetadata("gif");
metadata.SetQuery("/grctlext/Delay", (ushort)(frameInfo.DelayTime * 100)); // Delay in hundredths of seconds
var metadata = new BitmapMetadata(ImagingResources.GifMetadata);
metadata.SetQuery(ImagingResources.GifMetadataQueryDelay, (ushort)(frameInfo.DelayTime * 100)); // Delay in hundredths of seconds

gEnc.Frames.Add(BitmapFrame.Create(bitmapSource, null, metadata, null));
}
Expand Down
10 changes: 10 additions & 0 deletions Imaging/ImagingResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ public static class ImagingResources
/// </summary>
internal const string GifHeaderStart = "GIF";

/// <summary>
/// The meta data needed for a valid GIF header. Value: "gif"
/// </summary>
internal const string GifMetadata = "gif";

/// <summary>
/// The GIF metadata query delay. Value: "/grctlext/Delay"
/// </summary>
internal const string GifMetadataQueryDelay = "/grctlext/Delay";

/// <summary>
/// The flag indicating the presence of a global color table in the GIF file. Value: 0x80
/// </summary>
Expand Down

0 comments on commit bbd848f

Please sign in to comment.