2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 namespace Tizen.Multimedia.Util
22 /// Represent gif image data used to encode a gif image with <see cref="GifEncoder"/>.
28 /// Initialize a new instance of the <see cref="GifFrame"/> class with a buffer and a delay.
30 /// <param name="buffer">The raw image buffer to be encoded.</param>
31 /// <param name="delay">The delay for this image, in 0.001 sec units.</param>
32 /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is null.</exception>
33 /// <exception cref="ArgumentException">The length of <paramref name="buffer"/> is zero.</exception>
34 public GifFrame(byte[] buffer, uint delay)
38 throw new ArgumentNullException(nameof(buffer));
41 if (buffer.Length == 0)
43 throw new ArgumentException("buffer has no element.", nameof(buffer));
51 /// Gets the raw image data.
53 public byte[] Buffer { get; }
56 /// Gets or sets the delay for this image.
58 /// <value>Time delay in 0.001 sec units.</value>
59 public uint Delay { get; set; }