static HRESULT WINAPI JpegDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { JpegDecoder *This = (JpegDecoder*)iface; TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED; if (index != 0) return E_INVALIDARG; IWICBitmapDecoder_AddRef(iface); *ppIBitmapFrame = (IWICBitmapFrameDecode*)&This->lpFrameVtbl; return S_OK; }
static HRESULT WINAPI JpegDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { JpegDecoder *This = impl_from_IWICBitmapDecoder(iface); TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); if (!This->initialized) return WINCODEC_ERR_FRAMEMISSING; if (index != 0) return E_INVALIDARG; IWICBitmapDecoder_AddRef(iface); *ppIBitmapFrame = &This->IWICBitmapFrameDecode_iface; return S_OK; }
static HRESULT WINAPI GifDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { GifDecoder *This = (GifDecoder*)iface; GifFrameDecode *result; TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); if (!This->initialized) return WINCODEC_ERR_NOTINITIALIZED; if (index >= This->gif->ImageCount) return E_INVALIDARG; result = HeapAlloc(GetProcessHeap(), 0, sizeof(GifFrameDecode)); if (!result) return E_OUTOFMEMORY; result->lpVtbl = &GifFrameDecode_Vtbl; result->ref = 1; result->frame = &This->gif->SavedImages[index]; IWICBitmapDecoder_AddRef(iface); result->parent = This; *ppIBitmapFrame = (IWICBitmapFrameDecode*)result; return S_OK; }
static ULONG WINAPI PngDecoder_Block_AddRef(IWICMetadataBlockReader *iface) { PngDecoder *This = impl_from_IWICMetadataBlockReader(iface); return IWICBitmapDecoder_AddRef(&This->IWICBitmapDecoder_iface); }
static ULONG WINAPI PngDecoder_Frame_AddRef(IWICBitmapFrameDecode *iface) { PngDecoder *This = impl_from_IWICBitmapFrameDecode(iface); return IWICBitmapDecoder_AddRef(&This->IWICBitmapDecoder_iface); }