mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
954 B
32 lines
954 B
// Copyright (c) Six Labors.
|
|
// Licensed under the Six Labors Split License.
|
|
|
|
namespace SixLabors.ImageSharp.Formats.Jpeg;
|
|
|
|
/// <summary>
|
|
/// Represents a JPEG comment
|
|
/// </summary>
|
|
public readonly struct JpegComData
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="JpegComData"/> struct.
|
|
/// </summary>
|
|
/// <param name="value">The comment buffer.</param>
|
|
public JpegComData(ReadOnlyMemory<char> value)
|
|
=> this.Value = value;
|
|
|
|
/// <summary>
|
|
/// Gets the value.
|
|
/// </summary>
|
|
public ReadOnlyMemory<char> Value { get; }
|
|
|
|
/// <summary>
|
|
/// Converts string to <see cref="JpegComData"/>
|
|
/// </summary>
|
|
/// <param name="value">The comment string.</param>
|
|
/// <returns>The <see cref="JpegComData"/></returns>
|
|
public static JpegComData FromString(string value) => new(value.AsMemory());
|
|
|
|
/// <inheritdoc/>
|
|
public override string ToString() => this.Value.ToString();
|
|
}
|
|
|