Skip to content

Latest commit

 

History

History
82 lines (60 loc) · 3.93 KB

nf-wincodec-iwicbitmapencoder-commit.md

File metadata and controls

82 lines (60 loc) · 3.93 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincodec.IWICBitmapEncoder.Commit
IWICBitmapEncoder::Commit (wincodec.h)
Commits all changes for the image and closes the stream.
Commit
Commit method [Windows Imaging Component]
Commit method [Windows Imaging Component]
IWICBitmapEncoder interface
IWICBitmapEncoder interface [Windows Imaging Component]
Commit method
IWICBitmapEncoder.Commit
IWICBitmapEncoder::Commit
_wic_codec_iwicbitmapencoder_commit
wic._wic_codec_iwicbitmapencoder_commit
wincodec/IWICBitmapEncoder::Commit
wic\_wic_codec_iwicbitmapencoder_commit.htm
wic
97e39e73-3494-4679-8962-eb48242f9b9f
12/05/2018
Commit, Commit method [Windows Imaging Component], Commit method [Windows Imaging Component],IWICBitmapEncoder interface, IWICBitmapEncoder interface [Windows Imaging Component],Commit method, IWICBitmapEncoder.Commit, IWICBitmapEncoder::Commit, _wic_codec_iwicbitmapencoder_commit, wic._wic_codec_iwicbitmapencoder_commit, wincodec/IWICBitmapEncoder::Commit
wincodec.h
Windows
Windows XP with SP2, Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Wincodec.idl
Windowscodecs.lib
Windowscodecs.dll
Windows
19H1
IWICBitmapEncoder::Commit
wincodec/IWICBitmapEncoder::Commit
c++
APIRef
kbSyntax
COM
Windowscodecs.dll
IWICBitmapEncoder.Commit

IWICBitmapEncoder::Commit

-description

Commits all changes for the image and closes the stream.

-returns

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

To finalize an image, both the frame Commit and the encoder Commit must be called. However, only call the encoder Commit method after all frames have been committed.

After the encoder has been committed, it can't be re-initialized or reused with another stream. A new encoder interface must be created, for example, with IWICImagingFactory::CreateEncoder.

For the encoder Commit to succeed, you must at a minimum call IWICBitmapEncoder::Initialize and either IWICBitmapFrameEncode::WriteSource or IWICBitmapFrameEncode::WritePixels.

IWICBitmapFrameEncode::WriteSource specifies all parameters needed to encode the image data. IWICBitmapFrameEncode::WritePixels requires that you also call IWICBitmapFrameEncode::SetSize, IWICBitmapFrameEncode::SetPixelFormat, and IWICBitmapFrameEncode::SetPalette (if the pixel format is indexed).

-see-also

Commit

IWICBitmapEncoder