OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::AnimatedGIFWriter Class Reference

GIF アニメーションのファイル書き出し More...

#include <AnimatedGIFWriter.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 AnimatedGIFWriter ()
 デフォルトコンストラクタ More...
 
SIV3D_NODISCARD_CXX20 AnimatedGIFWriter (FilePathView path, int32 width, int32 height, Dither dither=Dither::No, HasAlpha hasAlpha=HasAlpha::No)
 GIF アニメーションを書き出すファイルをオープンします。 More...
 
SIV3D_NODISCARD_CXX20 AnimatedGIFWriter (FilePathView path, Size size, Dither dither=Dither::No, HasAlpha hasAlpha=HasAlpha::No)
 GIF アニメーションを書き出すファイルをオープンします。 More...
 
 ~AnimatedGIFWriter ()
 デストラクタ More...
 
bool open (FilePathView path, int32 width, int32 height, Dither dither=Dither::No, HasAlpha hasAlpha=HasAlpha::No)
 GIF アニメーションを書き出すファイルをオープンします。 More...
 
bool open (FilePathView path, const Size &size, Dither dither=Dither::No, HasAlpha hasAlpha=HasAlpha::No)
 GIF アニメーションを書き出すファイルをオープンします。 More...
 
bool close ()
 アニメーション GIF の作成を終了し、保存します。 More...
 
bool isOpen () const noexcept
 書き出し用ファイルがオープンされているかを返します。 More...
 
 operator bool () const noexcept
 書き出し用ファイルがオープンされているかを返します。 More...
 
bool writeFrame (const Image &image, const Duration &delay=SecondsF{ 0.1 })
 フレームを書き出します。 More...
 
size_t frameCount () const noexcept
 書き出したフレームの合計数を返します。 More...
 
Size imageSize () const noexcept
 GIF 画像の幅と高さ(ピクセル)を返します。 More...
 

Detailed Description

GIF アニメーションのファイル書き出し

Constructor & Destructor Documentation

◆ AnimatedGIFWriter() [1/3]

SIV3D_NODISCARD_CXX20 s3d::AnimatedGIFWriter::AnimatedGIFWriter ( )

デフォルトコンストラクタ

◆ AnimatedGIFWriter() [2/3]

SIV3D_NODISCARD_CXX20 s3d::AnimatedGIFWriter::AnimatedGIFWriter ( FilePathView  path,
int32  width,
int32  height,
Dither  dither = Dither::No,
HasAlpha  hasAlpha = HasAlpha::No 
)

GIF アニメーションを書き出すファイルをオープンします。

Parameters
path書き出し先のファイルパス
widthGIF 画像の幅(ピクセル)
heightGIF 画像の高さ(ピクセル)
ditherディザリングを適用するか
hasAlpha背景透過があるか

◆ AnimatedGIFWriter() [3/3]

SIV3D_NODISCARD_CXX20 s3d::AnimatedGIFWriter::AnimatedGIFWriter ( FilePathView  path,
Size  size,
Dither  dither = Dither::No,
HasAlpha  hasAlpha = HasAlpha::No 
)

GIF アニメーションを書き出すファイルをオープンします。

Parameters
path書き出し先のファイルパス
sizeGIF 画像の幅と高さ(ピクセル)
ditherディザリングを適用するか
hasAlpha背景透過があるか

◆ ~AnimatedGIFWriter()

s3d::AnimatedGIFWriter::~AnimatedGIFWriter ( )

デストラクタ

Member Function Documentation

◆ close()

bool s3d::AnimatedGIFWriter::close ( )

アニメーション GIF の作成を終了し、保存します。

Remarks
新しいアニメーション GIF を作成するには、再度 open() する必要があります。
Returns
アニメーション GIF の保存に成功したら true, 失敗したら false

◆ frameCount()

size_t s3d::AnimatedGIFWriter::frameCount ( ) const
noexcept

書き出したフレームの合計数を返します。

Returns
書き出したフレームの合計数

◆ imageSize()

Size s3d::AnimatedGIFWriter::imageSize ( ) const
noexcept

GIF 画像の幅と高さ(ピクセル)を返します。

Returns
GIF 画像の幅と高さ(ピクセル)

◆ isOpen()

bool s3d::AnimatedGIFWriter::isOpen ( ) const
noexcept

書き出し用ファイルがオープンされているかを返します。

Returns
ファイルがオープンされている場合 true, それ以外の場合は false

◆ open() [1/2]

bool s3d::AnimatedGIFWriter::open ( FilePathView  path,
const Size size,
Dither  dither = Dither::No,
HasAlpha  hasAlpha = HasAlpha::No 
)

GIF アニメーションを書き出すファイルをオープンします。

Parameters
path書き出し先のファイルパス
sizeGIF 画像の幅と高さ(ピクセル)
ditherディザリングを適用するか
hasAlpha背景透過があるか
Returns
オープンに成功した場合 true, それ以外の場合は false

◆ open() [2/2]

bool s3d::AnimatedGIFWriter::open ( FilePathView  path,
int32  width,
int32  height,
Dither  dither = Dither::No,
HasAlpha  hasAlpha = HasAlpha::No 
)

GIF アニメーションを書き出すファイルをオープンします。

Parameters
path書き出し先のファイルパス
widthGIF 画像の幅(ピクセル)
heightGIF 画像の高さ(ピクセル)
ditherディザリングを適用するか
hasAlpha背景透過があるか
Returns
オープンに成功した場合 true, それ以外の場合は false

◆ operator bool()

s3d::AnimatedGIFWriter::operator bool ( ) const
explicitnoexcept

書き出し用ファイルがオープンされているかを返します。

Returns
ファイルがオープンされている場合 true, それ以外の場合は false

◆ writeFrame()

bool s3d::AnimatedGIFWriter::writeFrame ( const Image image,
const Duration delay = SecondsF{ 0.1 } 
)

フレームを書き出します。

Parameters
image書き出すフレームの画像
delayアニメーションの間隔
Remarks
画像は出力する動画の解像度と同じサイズでなければいけません。
Returns
フレームの書き出しに成功したら true, 失敗したら false

The documentation for this class was generated from the following file: