BitmapSaverData Class Reference

#include <c4d_filterdata.h>

Inheritance diagram for BitmapSaverData:

详细描述

A data class for creating bitmap saver plugins.
使用 RegisterBitmapSaverPlugin() to register a bitmap saver plugin.

公共成员函数

virtual IMAGERESULT   Save (const Filename &name, BaseBitmap *bm, BaseContainer *data, SAVEBIT savebits)
virtual Bool   编辑 ( BaseContainer *data)
virtual Int32   GetMaxAlphas ( BaseContainer *data)
virtual Int32   GetMaxResolution ( Bool layers)
virtual void  CorrectResolution (const BaseContainer *settings, Int32 videoWidth, Int32 videoHeight, Int32 &videoWidthPadded, Int32 &videoHeightPadded)
-  Public Member Functions inherited from BaseData
  BaseData ()
virtual  ~BaseData (void)
void  Destructor (void)

Movie Saver

virtual IMAGERESULT   Open (PluginMovieData *&md, const Filename &name, BaseBitmap *bm, BaseContainer *data, SAVEBIT savebits, Int32 fps)
virtual IMAGERESULT   Write (PluginMovieData *md, BaseBitmap *bm)
virtual IMAGERESULT   关闭 (PluginMovieData *&md)
virtual IMAGERESULT   AddSound (PluginMovieData *md, BaseSound *snd)

成员函数文档编制

◆  Save()

virtual IMAGERESULT Save ( const Filename name ,
BaseBitmap bm ,
BaseContainer data ,
SAVEBIT   savebits  
)
virtual

Called to save a bitmap to a file.

参数
[in] name The name of the file to save.
[in] bm The bitmap to save the image from. Cinema 4D owns the pointed bitmap.
[in] data The settings container for the bitmap saver. These are stored with the general preferences. Cinema 4D owns the pointed container.
[in] savebits The save bits flags: SAVEBIT
返回
The result of saving the file: IMAGERESULT

◆  Edit()

virtual Bool 编辑 ( BaseContainer data )
virtual

Called to open the settings dialog for the bitmap loader/saver.

参数
[in] data The settings container for the bitmap saver. These are stored with the general preferences. Cinema 4D owns the pointed container.
返回
true if the settings dialog opened successfully, otherwise false .

◆  GetMaxAlphas()

virtual Int32 GetMaxAlphas ( BaseContainer data )
virtual

Called to get the maximum number of alpha channels this format supports with the current settings.

参数
[in] data The settings container for the bitmap saver. These are stored with the general preferences. Cinema 4D owns the pointed container.
返回
The number of alpha channels.

◆  GetMaxResolution()

virtual Int32 GetMaxResolution ( Bool   layers )
virtual

Called to get the maximum resolution of the image format.

参数
[in] layers true if layers are to be saved, otherwise false .
返回
The maximum resolution supported by the image format.

◆  CorrectResolution()

virtual void CorrectResolution ( const BaseContainer settings ,
Int32   videoWidth ,
Int32   videoHeight ,
Int32 videoWidthPadded ,
Int32 videoHeightPadded  
)
virtual

Corrects the given input size to the preferred saver size.

由于
R19
参数
[in] settings Optional settings to use.
[in] videoWidth Resolution width to check.
[in] videoHeight Resolution height to check.
[out] videoWidthPadded Corrected resolution width.
[out] videoHeightPadded Corrected resolution height.

◆  Open()

virtual IMAGERESULT Open ( PluginMovieData *&  md ,
const Filename name ,
BaseBitmap bm ,
BaseContainer data ,
SAVEBIT   savebits ,
Int32   fps  
)
virtual

Called to open a movie for saving.
Here is some code from QuickTime saver:

IMAGERESULT QTMovieSaver::Open(PluginMovieData *&md, const Filename &name, BaseBitmap *bm, BaseContainer *data, SAVEBIT savebits, Int32 fps) { md = nullptr ; MacMovie* sa = nullptr ; sa = (MacMovie*) NewMemClear ( sizeof (MacMovie)); if (!sa) return IMAGERESULT::OUTOFMEMORY ; md = (PluginMovieData*)sa; ... }
参数
[in,out] md An opaque pointer that can be used by the bitmap saver to store data in (by casting it to the dummy type PluginMovieData ).
[in] name The name of the file to load.
[in] bm A typical frame of the movie, used for dimensions.
[in] data The settings container for the bitmap saver. These are stored with the general preferences. Cinema 4D owns the pointed container.
[in] savebits The save bits flags: SAVEBIT
[in] fps The frames per second.
返回
The result of opening a movie: IMAGERESULT

◆  Write()

virtual IMAGERESULT Write ( PluginMovieData *  md ,
BaseBitmap bm  
)
virtual

Called to write a frame to a movie.

参数
[in] md An opaque pointer that can be set in Open and used here.
[in] bm The bitmap frame to save to the movie. Cinema 4D owns the pointed bitmap.
返回
The result of writing a frame to a movie: IMAGERESULT

◆  Close()

virtual IMAGERESULT 关闭 ( PluginMovieData *&  md )
virtual

Called to close a movie opened with Open .

参数
[in] md The opaque pointer that can be set in Open and that should be freed and set to nullptr .
返回
The result: IMAGERESULT
Changed in R19. Previously returned void .

◆  AddSound()

virtual IMAGERESULT AddSound ( PluginMovieData *  md ,
BaseSound snd  
)
virtual

Adds sound to a movie.

参数
[in] md An opaque pointer that can be set in Open and used here.
[in] snd The sound to add. Cinema 4D owns the pointed sound.
返回
The result: IMAGERESULT
NewMemClear
#define NewMemClear(T, cnt)
定义: defaultallocator.h:205
Filename
Manages file and path names.
定义: c4d_file.h:93
Int32
maxon::Int32 Int32
定义: ge_sys_math.h:58
BaseBitmap
定义: c4d_basebitmap.h:410
IMAGERESULT::OUTOFMEMORY
@ OUTOFMEMORY
Not enough memory.
IMAGERESULT
IMAGERESULT
定义: ge_prepass.h:3659
SAVEBIT
SAVEBIT
定义: ge_prepass.h:265
BaseContainer
定义: c4d_basecontainer.h:46