ReactOS 0.4.16-dev-753-g705a985
bitmap.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wincodecs_private.h"
#include "wine/asm.h"
#include "wine/debug.h"
#include "initguid.h"
Include dependency graph for bitmap.c:

Go to the source code of this file.

Classes

struct  BitmapImpl
 
struct  BitmapLockImpl
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct BitmapImpl BitmapImpl
 
typedef struct BitmapLockImpl BitmapLockImpl
 

Functions

 DEFINE_GUID (IID_CMetaBitmapRenderTarget, 0x0ccd7824, 0xdc16, 0x4d09, 0xbc, 0xa8, 0x6b, 0x09, 0xc4, 0xef, 0x55, 0x35)
 
 WINE_DEFAULT_DEBUG_CHANNEL (wincodecs)
 
static BitmapImplimpl_from_IWICBitmap (IWICBitmap *iface)
 
static BitmapImplimpl_from_IMILBitmap (IMILBitmap *iface)
 
static BitmapImplimpl_from_IMILUnknown1 (IMILUnknown1 *iface)
 
static BitmapLockImplimpl_from_IWICBitmapLock (IWICBitmapLock *iface)
 
static BOOL BitmapImpl_AcquireLock (BitmapImpl *This, int write)
 
static void BitmapImpl_ReleaseLock (BitmapImpl *This)
 
static HRESULT WINAPI BitmapLockImpl_QueryInterface (IWICBitmapLock *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI BitmapLockImpl_AddRef (IWICBitmapLock *iface)
 
static ULONG WINAPI BitmapLockImpl_Release (IWICBitmapLock *iface)
 
static HRESULT WINAPI BitmapLockImpl_GetSize (IWICBitmapLock *iface, UINT *puiWidth, UINT *puiHeight)
 
static HRESULT WINAPI BitmapLockImpl_GetStride (IWICBitmapLock *iface, UINT *pcbStride)
 
static HRESULT WINAPI BitmapLockImpl_GetDataPointer (IWICBitmapLock *iface, UINT *pcbBufferSize, BYTE **ppbData)
 
static HRESULT WINAPI BitmapLockImpl_GetPixelFormat (IWICBitmapLock *iface, WICPixelFormatGUID *pPixelFormat)
 
static HRESULT WINAPI BitmapImpl_QueryInterface (IWICBitmap *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI BitmapImpl_AddRef (IWICBitmap *iface)
 
static ULONG WINAPI BitmapImpl_Release (IWICBitmap *iface)
 
static HRESULT WINAPI BitmapImpl_GetSize (IWICBitmap *iface, UINT *puiWidth, UINT *puiHeight)
 
static HRESULT WINAPI BitmapImpl_GetPixelFormat (IWICBitmap *iface, WICPixelFormatGUID *pPixelFormat)
 
static HRESULT WINAPI BitmapImpl_GetResolution (IWICBitmap *iface, double *pDpiX, double *pDpiY)
 
static HRESULT WINAPI BitmapImpl_CopyPalette (IWICBitmap *iface, IWICPalette *pIPalette)
 
static HRESULT WINAPI BitmapImpl_CopyPixels (IWICBitmap *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
 
static HRESULT WINAPI BitmapImpl_Lock (IWICBitmap *iface, const WICRect *prcLock, DWORD flags, IWICBitmapLock **ppILock)
 
static HRESULT WINAPI BitmapImpl_SetPalette (IWICBitmap *iface, IWICPalette *pIPalette)
 
static HRESULT WINAPI BitmapImpl_SetResolution (IWICBitmap *iface, double dpiX, double dpiY)
 
static HRESULT WINAPI IMILBitmapImpl_QueryInterface (IMILBitmap *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI IMILBitmapImpl_AddRef (IMILBitmap *iface)
 
static ULONG WINAPI IMILBitmapImpl_Release (IMILBitmap *iface)
 
static HRESULT WINAPI IMILBitmapImpl_GetSize (IMILBitmap *iface, UINT *width, UINT *height)
 
static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat (IMILBitmap *iface, int *format)
 
static HRESULT WINAPI IMILBitmapImpl_GetResolution (IMILBitmap *iface, double *dpix, double *dpiy)
 
static HRESULT WINAPI IMILBitmapImpl_CopyPalette (IMILBitmap *iface, IWICPalette *palette)
 
static HRESULT WINAPI IMILBitmapImpl_CopyPixels (IMILBitmap *iface, const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
 
static HRESULT WINAPI IMILBitmapImpl_unknown1 (IMILBitmap *iface, void **ppv)
 
static HRESULT WINAPI IMILBitmapImpl_Lock (IMILBitmap *iface, const WICRect *rc, DWORD flags, IWICBitmapLock **lock)
 
static HRESULT WINAPI IMILBitmapImpl_Unlock (IMILBitmap *iface, IWICBitmapLock *lock)
 
static HRESULT WINAPI IMILBitmapImpl_SetPalette (IMILBitmap *iface, IWICPalette *palette)
 
static HRESULT WINAPI IMILBitmapImpl_SetResolution (IMILBitmap *iface, double dpix, double dpiy)
 
static HRESULT WINAPI IMILBitmapImpl_AddDirtyRect (IMILBitmap *iface, const WICRect *rc)
 
static HRESULT WINAPI IMILUnknown1Impl_QueryInterface (IMILUnknown1 *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI IMILUnknown1Impl_AddRef (IMILUnknown1 *iface)
 
static ULONG WINAPI IMILUnknown1Impl_Release (IMILUnknown1 *iface)
 
void WINAPI IMILUnknown1Impl_unknown1 (IMILUnknown1 *iface, void *arg)
 
static HRESULT WINAPI IMILUnknown1Impl_unknown2 (IMILUnknown1 *iface, void *arg1, void *arg2)
 
HRESULT WINAPI IMILUnknown1Impl_unknown3 (IMILUnknown1 *iface, void *arg)
 
static HRESULT WINAPI IMILUnknown1Impl_unknown4 (IMILUnknown1 *iface, void *arg)
 
static HRESULT WINAPI IMILUnknown1Impl_unknown5 (IMILUnknown1 *iface, void *arg)
 
static HRESULT WINAPI IMILUnknown1Impl_unknown6 (IMILUnknown1 *iface, DWORD64 arg)
 
static HRESULT WINAPI IMILUnknown1Impl_unknown7 (IMILUnknown1 *iface, void *arg)
 
HRESULT WINAPI IMILUnknown1Impl_unknown8 (IMILUnknown1 *iface)
 
static HRESULT WINAPI IMILUnknown2Impl_QueryInterface (IMILUnknown2 *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI IMILUnknown2Impl_AddRef (IMILUnknown2 *iface)
 
static ULONG WINAPI IMILUnknown2Impl_Release (IMILUnknown2 *iface)
 
static HRESULT WINAPI IMILUnknown2Impl_unknown1 (IMILUnknown2 *iface, void *arg1, void **arg2)
 
static HRESULT WINAPI IMILUnknown2Impl_unknown2 (IMILUnknown2 *iface, void *arg1, void *arg2)
 
static HRESULT WINAPI IMILUnknown2Impl_unknown3 (IMILUnknown2 *iface, void *arg1)
 
HRESULT BitmapImpl_Create (UINT uiWidth, UINT uiHeight, UINT stride, UINT datasize, void *view, UINT offset, REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option, IWICBitmap **ppIBitmap)
 

Variables

static const IWICBitmapLockVtbl BitmapLockImpl_Vtbl
 
static const IWICBitmapVtbl BitmapImpl_Vtbl
 
struct {
   const GUID *   WIC_format
 
   int   enum_format
 
pixel_fmt_map []
 
static const IMILBitmapVtbl IMILBitmapImpl_Vtbl
 
static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl
 
static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file bitmap.c.

Typedef Documentation

◆ BitmapImpl

◆ BitmapLockImpl

Function Documentation

◆ BitmapImpl_AcquireLock()

static BOOL BitmapImpl_AcquireLock ( BitmapImpl This,
int  write 
)
static

Definition at line 89 of file bitmap.c.

90{
91 if (write)
92 {
93 return 0 == InterlockedCompareExchange(&This->lock, -1, 0);
94 }
95 else
96 {
97 while (1)
98 {
99 LONG prev_val = This->lock;
100 if (prev_val == -1)
101 return FALSE;
102 if (prev_val == InterlockedCompareExchange(&This->lock, prev_val+1, prev_val))
103 return TRUE;
104 }
105 }
106}
#define write
Definition: acwin.h:97
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define InterlockedCompareExchange
Definition: interlocked.h:104
long LONG
Definition: pedump.c:60

Referenced by BitmapImpl_Lock().

◆ BitmapImpl_AddRef()

static ULONG WINAPI BitmapImpl_AddRef ( IWICBitmap iface)
static

Definition at line 271 of file bitmap.c.

272{
275
276 TRACE("(%p) refcount=%lu\n", iface, ref);
277
278 return ref;
279}
#define InterlockedIncrement
Definition: armddk.h:53
static BitmapImpl * impl_from_IWICBitmap(IWICBitmap *iface)
Definition: bitmap.c:69
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ BitmapImpl_CopyPalette()

static HRESULT WINAPI BitmapImpl_CopyPalette ( IWICBitmap iface,
IWICPalette pIPalette 
)
static

Definition at line 349 of file bitmap.c.

351{
353 TRACE("(%p,%p)\n", iface, pIPalette);
354
355 if (!This->palette_set)
357
358 return IWICPalette_InitializeFromPalette(pIPalette, This->palette);
359}
#define WINCODEC_ERR_PALETTEUNAVAILABLE
Definition: winerror.h:3292

◆ BitmapImpl_CopyPixels()

static HRESULT WINAPI BitmapImpl_CopyPixels ( IWICBitmap iface,
const WICRect prc,
UINT  cbStride,
UINT  cbBufferSize,
BYTE pbBuffer 
)
static

Definition at line 361 of file bitmap.c.

363{
365 TRACE("(%p,%s,%u,%u,%p)\n", iface, debug_wic_rect(prc), cbStride, cbBufferSize, pbBuffer);
366
367 return copy_pixels(This->bpp, This->data, This->width, This->height,
368 This->stride, prc, cbStride, cbBufferSize, pbBuffer);
369}
void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size, const struct pixel_format_desc *format) DECLSPEC_HIDDEN
Definition: surface.c:1700
_Out_ LPRECT prc
Definition: ntgdi.h:1658
static const char * debug_wic_rect(const WICRect *rect)

◆ BitmapImpl_Create()

HRESULT BitmapImpl_Create ( UINT  uiWidth,
UINT  uiHeight,
UINT  stride,
UINT  datasize,
void view,
UINT  offset,
REFWICPixelFormatGUID  pixelFormat,
WICBitmapCreateCacheOption  option,
IWICBitmap **  ppIBitmap 
)

Definition at line 790 of file bitmap.c.

793{
794 HRESULT hr;
796 BYTE *data;
797 UINT bpp;
798
799 hr = get_pixelformat_bpp(pixelFormat, &bpp);
800 if (FAILED(hr)) return hr;
801
802 if (!stride) stride = (((bpp*uiWidth)+31)/32)*4;
803 if (!datasize) datasize = stride * uiHeight;
804
805 if (datasize < stride * uiHeight) return WINCODEC_ERR_INSUFFICIENTBUFFER;
806 if (stride < ((bpp*uiWidth)+7)/8) return E_INVALIDARG;
807
808 This = malloc(sizeof(BitmapImpl));
809 if (!This) return E_OUTOFMEMORY;
810
811 if (view) data = (BYTE *)view + offset;
812 else if (!(data = calloc(1, datasize)))
813 {
814 free(This);
815 return E_OUTOFMEMORY;
816 }
817
818 This->IWICBitmap_iface.lpVtbl = &BitmapImpl_Vtbl;
819 This->IMILBitmap_iface.lpVtbl = &IMILBitmapImpl_Vtbl;
820 This->IMILUnknown1_iface.lpVtbl = &IMILUnknown1Impl_Vtbl;
821 This->IMILUnknown2_iface.lpVtbl = &IMILUnknown2Impl_Vtbl;
822 This->ref = 1;
823 This->palette = NULL;
824 This->palette_set = 0;
825 This->lock = 0;
826 This->data = data;
827 This->view = view;
828 This->offset = offset;
829 This->width = uiWidth;
830 This->height = uiHeight;
831 This->stride = stride;
832 This->bpp = bpp;
833 memcpy(&This->pixelformat, pixelFormat, sizeof(GUID));
834 This->dpix = This->dpiy = 0.0;
835#ifdef __REACTOS__
837#else
839#endif
840 This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BitmapImpl.lock");
841
842 *ppIBitmap = &This->IWICBitmap_iface;
843
844 return S_OK;
845}
static SIZE_T datasize
Definition: asm.c:30
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
DWORD bpp
Definition: surface.c:185
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
static const IMILBitmapVtbl IMILBitmapImpl_Vtbl
Definition: bitmap.c:636
static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl
Definition: bitmap.c:780
static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl
Definition: bitmap.c:726
static const IWICBitmapVtbl BitmapImpl_Vtbl
Definition: bitmap.c:468
HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp)
Definition: main.c:62
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizei stride
Definition: glext.h:5848
GLintptr offset
Definition: glext.h:5920
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned int UINT
Definition: ndis.h:50
#define calloc
Definition: rosglue.h:14
HRESULT hr
Definition: shlfolder.c:183
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define DWORD_PTR
Definition: treelist.c:76
#define WINCODEC_ERR_INSUFFICIENTBUFFER
Definition: winerror.h:3311
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1118
unsigned char BYTE
Definition: xxhash.c:193

Referenced by create_bitmap_from_source_rect(), ImagingFactory_CreateBitmap(), ImagingFactory_CreateBitmapFromHBITMAP(), ImagingFactory_CreateBitmapFromHICON(), ImagingFactory_CreateBitmapFromMemory(), and WICCreateBitmapFromSectionEx().

◆ BitmapImpl_GetPixelFormat()

static HRESULT WINAPI BitmapImpl_GetPixelFormat ( IWICBitmap iface,
WICPixelFormatGUID pPixelFormat 
)
static

Definition at line 318 of file bitmap.c.

320{
322 TRACE("(%p,%p)\n", iface, pPixelFormat);
323
324 if (!pPixelFormat)
325 return E_INVALIDARG;
326
327 memcpy(pPixelFormat, &This->pixelformat, sizeof(GUID));
328
329 return S_OK;
330}

◆ BitmapImpl_GetResolution()

static HRESULT WINAPI BitmapImpl_GetResolution ( IWICBitmap iface,
double pDpiX,
double pDpiY 
)
static

Definition at line 332 of file bitmap.c.

334{
336 TRACE("(%p,%p,%p)\n", iface, pDpiX, pDpiY);
337
338 if (!pDpiX || !pDpiY)
339 return E_INVALIDARG;
340
342 *pDpiX = This->dpix;
343 *pDpiY = This->dpiy;
345
346 return S_OK;
347}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

◆ BitmapImpl_GetSize()

static HRESULT WINAPI BitmapImpl_GetSize ( IWICBitmap iface,
UINT puiWidth,
UINT puiHeight 
)
static

Definition at line 303 of file bitmap.c.

305{
307 TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight);
308
309 if (!puiWidth || !puiHeight)
310 return E_INVALIDARG;
311
312 *puiWidth = This->width;
313 *puiHeight = This->height;
314
315 return S_OK;
316}

◆ BitmapImpl_Lock()

static HRESULT WINAPI BitmapImpl_Lock ( IWICBitmap iface,
const WICRect prcLock,
DWORD  flags,
IWICBitmapLock **  ppILock 
)
static

Definition at line 371 of file bitmap.c.

373{
376 WICRect rc;
377
378 TRACE("(%p,%s,%lx,%p)\n", iface, debug_wic_rect(prcLock), flags, ppILock);
379
380 if (!(flags & (WICBitmapLockRead|WICBitmapLockWrite)) || !ppILock)
381 return E_INVALIDARG;
382
383 if (!prcLock)
384 {
385 rc.X = rc.Y = 0;
386 rc.Width = This->width;
387 rc.Height = This->height;
388 prcLock = &rc;
389 }
390 else if (prcLock->X >= This->width || prcLock->Y >= This->height ||
391 prcLock->X + prcLock->Width > This->width ||
392 prcLock->Y + prcLock->Height > This->height ||
393 prcLock->Width <= 0 || prcLock->Height <= 0)
394 return E_INVALIDARG;
395 else if (((prcLock->X * This->bpp) % 8) != 0)
396 {
397 FIXME("Cannot lock at an X coordinate not at a full byte\n");
398 return E_FAIL;
399 }
400
401 result = malloc(sizeof(BitmapLockImpl));
402 if (!result)
403 return E_OUTOFMEMORY;
404
406 {
407 free(result);
409 }
410
411 result->IWICBitmapLock_iface.lpVtbl = &BitmapLockImpl_Vtbl;
412 result->ref = 1;
413 result->parent = This;
414 result->width = prcLock->Width;
415 result->height = prcLock->Height;
416 result->data = This->data + This->stride * prcLock->Y +
417 (This->bpp * prcLock->X)/8;
418
419 IWICBitmap_AddRef(&This->IWICBitmap_iface);
420 *ppILock = &result->IWICBitmapLock_iface;
421
422 return S_OK;
423}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_FAIL
Definition: ddrawi.h:102
static BOOL BitmapImpl_AcquireLock(BitmapImpl *This, int write)
Definition: bitmap.c:89
static const IWICBitmapLockVtbl BitmapLockImpl_Vtbl
Definition: bitmap.c:228
GLbitfield flags
Definition: glext.h:7161
GLuint64EXT * result
Definition: glext.h:11304
INT Height
Definition: wincodec.idl:335
INT Width
Definition: wincodec.idl:334
@ WICBitmapLockWrite
Definition: wincodec.idl:87
@ WICBitmapLockRead
Definition: wincodec.idl:86
#define WINCODEC_ERR_ALREADYLOCKED
Definition: winerror.h:3286

◆ BitmapImpl_QueryInterface()

static HRESULT WINAPI BitmapImpl_QueryInterface ( IWICBitmap iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 238 of file bitmap.c.

240{
242 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
243
244 if (!ppv) return E_INVALIDARG;
245
246 if (IsEqualIID(&IID_IUnknown, iid) ||
247 IsEqualIID(&IID_IWICBitmapSource, iid) ||
248 IsEqualIID(&IID_IWICBitmap, iid))
249 {
250 *ppv = &This->IWICBitmap_iface;
251 }
252 else if (IsEqualIID(&IID_IMILBitmap, iid) ||
254 {
255 *ppv = &This->IMILBitmap_iface;
256 }
257 else
258 {
259 if (IsEqualIID(&IID_CMetaBitmapRenderTarget, iid))
260 WARN("Ignoring interface %s\n", debugstr_guid(iid));
261 else
262 FIXME("unknown interface %s\n", debugstr_guid(iid));
263 *ppv = NULL;
264 return E_NOINTERFACE;
265 }
266
267 IUnknown_AddRef((IUnknown*)*ppv);
268 return S_OK;
269}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
IID IID_IMILBitmapSource
IID IID_IMILBitmap
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ BitmapImpl_Release()

static ULONG WINAPI BitmapImpl_Release ( IWICBitmap iface)
static

Definition at line 281 of file bitmap.c.

282{
285
286 TRACE("(%p) refcount=%lu\n", iface, ref);
287
288 if (ref == 0)
289 {
290 if (This->palette) IWICPalette_Release(This->palette);
291 This->cs.DebugInfo->Spare[0] = 0;
293 if (This->view)
294 UnmapViewOfFile(This->view);
295 else
296 free(This->data);
297 free(This);
298 }
299
300 return ref;
301}
#define InterlockedDecrement
Definition: armddk.h:52
#define UnmapViewOfFile
Definition: compat.h:746
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

◆ BitmapImpl_ReleaseLock()

static void BitmapImpl_ReleaseLock ( BitmapImpl This)
static

Definition at line 108 of file bitmap.c.

109{
110 while (1)
111 {
112 LONG prev_val = This->lock, new_val;
113 if (prev_val == -1)
114 new_val = 0;
115 else
116 new_val = prev_val - 1;
117 if (prev_val == InterlockedCompareExchange(&This->lock, new_val, prev_val))
118 break;
119 }
120}

Referenced by BitmapLockImpl_Release().

◆ BitmapImpl_SetPalette()

static HRESULT WINAPI BitmapImpl_SetPalette ( IWICBitmap iface,
IWICPalette pIPalette 
)
static

Definition at line 425 of file bitmap.c.

426{
428 HRESULT hr;
429
430 TRACE("(%p,%p)\n", iface, pIPalette);
431
432 if (!This->palette)
433 {
434 IWICPalette *new_palette;
435 hr = PaletteImpl_Create(&new_palette);
436
437 if (FAILED(hr)) return hr;
438
439 if (InterlockedCompareExchangePointer((void**)&This->palette, new_palette, NULL))
440 {
441 /* someone beat us to it */
442 IWICPalette_Release(new_palette);
443 }
444 }
445
446 hr = IWICPalette_InitializeFromPalette(This->palette, pIPalette);
447
448 if (SUCCEEDED(hr))
449 This->palette_set = 1;
450
451 return S_OK;
452}
HRESULT PaletteImpl_Create(IWICPalette **palette)
Definition: palette.c:897
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define SUCCEEDED(hr)
Definition: intsafe.h:50

◆ BitmapImpl_SetResolution()

static HRESULT WINAPI BitmapImpl_SetResolution ( IWICBitmap iface,
double  dpiX,
double  dpiY 
)
static

Definition at line 454 of file bitmap.c.

456{
458 TRACE("(%p,%f,%f)\n", iface, dpiX, dpiY);
459
461 This->dpix = dpiX;
462 This->dpiy = dpiY;
464
465 return S_OK;
466}

◆ BitmapLockImpl_AddRef()

static ULONG WINAPI BitmapLockImpl_AddRef ( IWICBitmapLock iface)
static

Definition at line 147 of file bitmap.c.

148{
151
152 TRACE("(%p) refcount=%lu\n", iface, ref);
153
154 return ref;
155}
static BitmapLockImpl * impl_from_IWICBitmapLock(IWICBitmapLock *iface)
Definition: bitmap.c:84

◆ BitmapLockImpl_GetDataPointer()

static HRESULT WINAPI BitmapLockImpl_GetDataPointer ( IWICBitmapLock iface,
UINT pcbBufferSize,
BYTE **  ppbData 
)
static

Definition at line 203 of file bitmap.c.

205{
207 TRACE("(%p,%p,%p)\n", iface, pcbBufferSize, ppbData);
208
209 if (!pcbBufferSize || !ppbData)
210 return E_INVALIDARG;
211
212 *pcbBufferSize = This->parent->stride * (This->height - 1) +
213 ((This->parent->bpp * This->width) + 7)/8;
214 *ppbData = This->data;
215
216 return S_OK;
217}

◆ BitmapLockImpl_GetPixelFormat()

static HRESULT WINAPI BitmapLockImpl_GetPixelFormat ( IWICBitmapLock iface,
WICPixelFormatGUID pPixelFormat 
)
static

Definition at line 219 of file bitmap.c.

221{
223 TRACE("(%p,%p)\n", iface, pPixelFormat);
224
225 return IWICBitmap_GetPixelFormat(&This->parent->IWICBitmap_iface, pPixelFormat);
226}

◆ BitmapLockImpl_GetSize()

static HRESULT WINAPI BitmapLockImpl_GetSize ( IWICBitmapLock iface,
UINT puiWidth,
UINT puiHeight 
)
static

Definition at line 174 of file bitmap.c.

176{
178 TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight);
179
180 if (!puiWidth || !puiHeight)
181 return E_INVALIDARG;
182
183 *puiWidth = This->width;
184 *puiHeight = This->height;
185
186 return S_OK;
187}

◆ BitmapLockImpl_GetStride()

static HRESULT WINAPI BitmapLockImpl_GetStride ( IWICBitmapLock iface,
UINT pcbStride 
)
static

Definition at line 189 of file bitmap.c.

191{
193 TRACE("(%p,%p)\n", iface, pcbStride);
194
195 if (!pcbStride)
196 return E_INVALIDARG;
197
198 *pcbStride = This->parent->stride;
199
200 return S_OK;
201}

◆ BitmapLockImpl_QueryInterface()

static HRESULT WINAPI BitmapLockImpl_QueryInterface ( IWICBitmapLock iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 123 of file bitmap.c.

125{
127 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
128
129 if (!ppv) return E_INVALIDARG;
130
131 if (IsEqualIID(&IID_IUnknown, iid) ||
132 IsEqualIID(&IID_IWICBitmapLock, iid))
133 {
134 *ppv = &This->IWICBitmapLock_iface;
135 }
136 else
137 {
138 FIXME("unknown interface %s\n", debugstr_guid(iid));
139 *ppv = NULL;
140 return E_NOINTERFACE;
141 }
142
143 IUnknown_AddRef((IUnknown*)*ppv);
144 return S_OK;
145}

◆ BitmapLockImpl_Release()

static ULONG WINAPI BitmapLockImpl_Release ( IWICBitmapLock iface)
static

Definition at line 157 of file bitmap.c.

158{
161
162 TRACE("(%p) refcount=%lu\n", iface, ref);
163
164 if (ref == 0)
165 {
167 IWICBitmap_Release(&This->parent->IWICBitmap_iface);
168 free(This);
169 }
170
171 return ref;
172}
static void BitmapImpl_ReleaseLock(BitmapImpl *This)
Definition: bitmap.c:108

◆ DEFINE_GUID()

DEFINE_GUID ( IID_CMetaBitmapRenderTarget  ,
0x0ccd7824  ,
0xdc16  ,
0x4d09  ,
0xbc  ,
0xa8  ,
0x6b  ,
0x09  ,
0xc4  ,
0xef  ,
0x55  ,
0x35   
)

◆ IMILBitmapImpl_AddDirtyRect()

static HRESULT WINAPI IMILBitmapImpl_AddDirtyRect ( IMILBitmap *  iface,
const WICRect rc 
)
static

Definition at line 630 of file bitmap.c.

631{
632 FIXME("(%p,%p): stub\n", iface, rc);
633 return E_NOTIMPL;
634}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IMILBitmapImpl_AddRef()

static ULONG WINAPI IMILBitmapImpl_AddRef ( IMILBitmap *  iface)
static

Definition at line 490 of file bitmap.c.

491{
493 return IWICBitmap_AddRef(&This->IWICBitmap_iface);
494}
static BitmapImpl * impl_from_IMILBitmap(IMILBitmap *iface)
Definition: bitmap.c:74

◆ IMILBitmapImpl_CopyPalette()

static HRESULT WINAPI IMILBitmapImpl_CopyPalette ( IMILBitmap *  iface,
IWICPalette palette 
)
static

Definition at line 572 of file bitmap.c.

574{
576 TRACE("(%p,%p)\n", iface, palette);
577 return IWICBitmap_CopyPalette(&This->IWICBitmap_iface, palette);
578}
static HPALETTE palette
Definition: clipboard.c:1345

◆ IMILBitmapImpl_CopyPixels()

static HRESULT WINAPI IMILBitmapImpl_CopyPixels ( IMILBitmap *  iface,
const WICRect rc,
UINT  stride,
UINT  size,
BYTE buffer 
)
static

Definition at line 580 of file bitmap.c.

582{
584 TRACE("(%p,%p,%u,%u,%p)\n", iface, rc, stride, size, buffer);
585 return IWICBitmap_CopyPixels(&This->IWICBitmap_iface, rc, stride, size, buffer);
586}
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919

◆ IMILBitmapImpl_GetPixelFormat()

static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat ( IMILBitmap *  iface,
int format 
)
static

Definition at line 539 of file bitmap.c.

541{
543 int i;
544
545 TRACE("(%p,%p)\n", iface, format);
546
547 if (!format) return E_INVALIDARG;
548
549 *format = 0;
550
551 for (i = 0; i < ARRAY_SIZE(pixel_fmt_map); i++)
552 {
553 if (IsEqualGUID(pixel_fmt_map[i].WIC_format, &This->pixelformat))
554 {
555 *format = pixel_fmt_map[i].enum_format;
556 break;
557 }
558 }
559
560 TRACE("=> %u\n", *format);
561 return S_OK;
562}
#define ARRAY_SIZE(A)
Definition: main.h:20
const GUID * WIC_format
Definition: bitmap.c:512
static const struct @599 pixel_fmt_map[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
Definition: format.c:58

◆ IMILBitmapImpl_GetResolution()

static HRESULT WINAPI IMILBitmapImpl_GetResolution ( IMILBitmap *  iface,
double dpix,
double dpiy 
)
static

Definition at line 564 of file bitmap.c.

566{
568 TRACE("(%p,%p,%p)\n", iface, dpix, dpiy);
569 return IWICBitmap_GetResolution(&This->IWICBitmap_iface, dpix, dpiy);
570}

◆ IMILBitmapImpl_GetSize()

static HRESULT WINAPI IMILBitmapImpl_GetSize ( IMILBitmap *  iface,
UINT width,
UINT height 
)
static

Definition at line 502 of file bitmap.c.

504{
506 TRACE("(%p,%p,%p)\n", iface, width, height);
507 return IWICBitmap_GetSize(&This->IWICBitmap_iface, width, height);
508}
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546

◆ IMILBitmapImpl_Lock()

static HRESULT WINAPI IMILBitmapImpl_Lock ( IMILBitmap *  iface,
const WICRect rc,
DWORD  flags,
IWICBitmapLock **  lock 
)
static

Definition at line 602 of file bitmap.c.

603{
605 TRACE("(%p,%p,%08lx,%p)\n", iface, rc, flags, lock);
606 return IWICBitmap_Lock(&This->IWICBitmap_iface, rc, flags, lock);
607}
rwlock_t lock
Definition: tcpcore.h:0

◆ IMILBitmapImpl_QueryInterface()

static HRESULT WINAPI IMILBitmapImpl_QueryInterface ( IMILBitmap *  iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 482 of file bitmap.c.

484{
486 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
487 return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
488}

◆ IMILBitmapImpl_Release()

static ULONG WINAPI IMILBitmapImpl_Release ( IMILBitmap *  iface)
static

Definition at line 496 of file bitmap.c.

497{
499 return IWICBitmap_Release(&This->IWICBitmap_iface);
500}

◆ IMILBitmapImpl_SetPalette()

static HRESULT WINAPI IMILBitmapImpl_SetPalette ( IMILBitmap *  iface,
IWICPalette palette 
)
static

Definition at line 616 of file bitmap.c.

617{
619 TRACE("(%p,%p)\n", iface, palette);
620 return IWICBitmap_SetPalette(&This->IWICBitmap_iface, palette);
621}

◆ IMILBitmapImpl_SetResolution()

static HRESULT WINAPI IMILBitmapImpl_SetResolution ( IMILBitmap *  iface,
double  dpix,
double  dpiy 
)
static

Definition at line 623 of file bitmap.c.

624{
626 TRACE("(%p,%f,%f)\n", iface, dpix, dpiy);
627 return IWICBitmap_SetResolution(&This->IWICBitmap_iface, dpix, dpiy);
628}

◆ IMILBitmapImpl_unknown1()

static HRESULT WINAPI IMILBitmapImpl_unknown1 ( IMILBitmap *  iface,
void **  ppv 
)
static

Definition at line 588 of file bitmap.c.

589{
591
592 TRACE("(%p,%p)\n", iface, ppv);
593
594 if (!ppv) return E_INVALIDARG;
595
596 /* reference count is not incremented here */
597 *ppv = &This->IMILUnknown1_iface;
598
599 return S_OK;
600}

◆ IMILBitmapImpl_Unlock()

static HRESULT WINAPI IMILBitmapImpl_Unlock ( IMILBitmap *  iface,
IWICBitmapLock lock 
)
static

Definition at line 609 of file bitmap.c.

610{
611 TRACE("(%p,%p)\n", iface, lock);
612 IWICBitmapLock_Release(lock);
613 return S_OK;
614}

◆ IMILUnknown1Impl_AddRef()

static ULONG WINAPI IMILUnknown1Impl_AddRef ( IMILUnknown1 iface)
static

Definition at line 663 of file bitmap.c.

664{
666 return IWICBitmap_AddRef(&This->IWICBitmap_iface);
667}
static BitmapImpl * impl_from_IMILUnknown1(IMILUnknown1 *iface)
Definition: bitmap.c:79

◆ IMILUnknown1Impl_QueryInterface()

static HRESULT WINAPI IMILUnknown1Impl_QueryInterface ( IMILUnknown1 iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 654 of file bitmap.c.

656{
657 /* It's not clear what interface should be returned here */
658 FIXME("(%p,%s,%p): stub\n", iface, debugstr_guid(iid), ppv);
659 *ppv = NULL;
660 return E_NOINTERFACE;
661}

◆ IMILUnknown1Impl_Release()

static ULONG WINAPI IMILUnknown1Impl_Release ( IMILUnknown1 iface)
static

Definition at line 669 of file bitmap.c.

670{
672 return IWICBitmap_Release(&This->IWICBitmap_iface);
673}

◆ IMILUnknown1Impl_unknown1()

void WINAPI IMILUnknown1Impl_unknown1 ( IMILUnknown1 iface,
void arg 
)

Definition at line 675 of file bitmap.c.

676{
677 FIXME("(%p,%p): stub\n", iface, arg);
678}

◆ IMILUnknown1Impl_unknown2()

static HRESULT WINAPI IMILUnknown1Impl_unknown2 ( IMILUnknown1 iface,
void arg1,
void arg2 
)
static

Definition at line 680 of file bitmap.c.

681{
682 FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
683 return E_NOTIMPL;
684}
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514

◆ IMILUnknown1Impl_unknown3()

HRESULT WINAPI IMILUnknown1Impl_unknown3 ( IMILUnknown1 iface,
void arg 
)

Definition at line 686 of file bitmap.c.

687{
688 FIXME("(%p,%p): stub\n", iface, arg);
689 return E_NOTIMPL;
690}

◆ IMILUnknown1Impl_unknown4()

static HRESULT WINAPI IMILUnknown1Impl_unknown4 ( IMILUnknown1 iface,
void arg 
)
static

Definition at line 692 of file bitmap.c.

693{
694 FIXME("(%p,%p): stub\n", iface, arg);
695 return E_NOTIMPL;
696}

◆ IMILUnknown1Impl_unknown5()

static HRESULT WINAPI IMILUnknown1Impl_unknown5 ( IMILUnknown1 iface,
void arg 
)
static

Definition at line 698 of file bitmap.c.

699{
700 FIXME("(%p,%p): stub\n", iface, arg);
701 return E_NOTIMPL;
702}

◆ IMILUnknown1Impl_unknown6()

static HRESULT WINAPI IMILUnknown1Impl_unknown6 ( IMILUnknown1 iface,
DWORD64  arg 
)
static

Definition at line 704 of file bitmap.c.

705{
706 FIXME("(%p,%s): stub\n", iface, wine_dbgstr_longlong(arg));
707 return E_NOTIMPL;
708}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ IMILUnknown1Impl_unknown7()

static HRESULT WINAPI IMILUnknown1Impl_unknown7 ( IMILUnknown1 iface,
void arg 
)
static

Definition at line 710 of file bitmap.c.

711{
712 FIXME("(%p,%p): stub\n", iface, arg);
713 return E_NOTIMPL;
714}

◆ IMILUnknown1Impl_unknown8()

HRESULT WINAPI IMILUnknown1Impl_unknown8 ( IMILUnknown1 iface)

Definition at line 716 of file bitmap.c.

717{
718 FIXME("(%p): stub\n", iface);
719 return E_NOTIMPL;
720}

◆ IMILUnknown2Impl_AddRef()

static ULONG WINAPI IMILUnknown2Impl_AddRef ( IMILUnknown2 *  iface)
static

Definition at line 749 of file bitmap.c.

750{
751 FIXME("(%p): stub\n", iface);
752 return 0;
753}

◆ IMILUnknown2Impl_QueryInterface()

static HRESULT WINAPI IMILUnknown2Impl_QueryInterface ( IMILUnknown2 *  iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 741 of file bitmap.c.

743{
744 FIXME("(%p,%s,%p): stub\n", iface, debugstr_guid(iid), ppv);
745 *ppv = NULL;
746 return E_NOINTERFACE;
747}

◆ IMILUnknown2Impl_Release()

static ULONG WINAPI IMILUnknown2Impl_Release ( IMILUnknown2 *  iface)
static

Definition at line 755 of file bitmap.c.

756{
757 FIXME("(%p): stub\n", iface);
758 return 0;
759}

◆ IMILUnknown2Impl_unknown1()

static HRESULT WINAPI IMILUnknown2Impl_unknown1 ( IMILUnknown2 *  iface,
void arg1,
void **  arg2 
)
static

Definition at line 761 of file bitmap.c.

762{
763 FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
764 if (arg2) *arg2 = NULL;
765 return E_NOTIMPL;
766}

◆ IMILUnknown2Impl_unknown2()

static HRESULT WINAPI IMILUnknown2Impl_unknown2 ( IMILUnknown2 *  iface,
void arg1,
void arg2 
)
static

Definition at line 768 of file bitmap.c.

769{
770 FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
771 return E_NOTIMPL;
772}

◆ IMILUnknown2Impl_unknown3()

static HRESULT WINAPI IMILUnknown2Impl_unknown3 ( IMILUnknown2 *  iface,
void arg1 
)
static

Definition at line 774 of file bitmap.c.

775{
776 FIXME("(%p,%p): stub\n", iface, arg1);
777 return E_NOTIMPL;
778}

◆ impl_from_IMILBitmap()

◆ impl_from_IMILUnknown1()

static BitmapImpl * impl_from_IMILUnknown1 ( IMILUnknown1 iface)
inlinestatic

Definition at line 79 of file bitmap.c.

80{
81 return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown1_iface);
82}

Referenced by IMILUnknown1Impl_AddRef(), and IMILUnknown1Impl_Release().

◆ impl_from_IWICBitmap()

◆ impl_from_IWICBitmapLock()

static BitmapLockImpl * impl_from_IWICBitmapLock ( IWICBitmapLock iface)
inlinestatic

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wincodecs  )

Variable Documentation

◆ BitmapImpl_Vtbl

const IWICBitmapVtbl BitmapImpl_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI BitmapImpl_CopyPalette(IWICBitmap *iface, IWICPalette *pIPalette)
Definition: bitmap.c:349
static ULONG WINAPI BitmapImpl_AddRef(IWICBitmap *iface)
Definition: bitmap.c:271
static HRESULT WINAPI BitmapImpl_GetPixelFormat(IWICBitmap *iface, WICPixelFormatGUID *pPixelFormat)
Definition: bitmap.c:318
static HRESULT WINAPI BitmapImpl_QueryInterface(IWICBitmap *iface, REFIID iid, void **ppv)
Definition: bitmap.c:238
static HRESULT WINAPI BitmapImpl_Lock(IWICBitmap *iface, const WICRect *prcLock, DWORD flags, IWICBitmapLock **ppILock)
Definition: bitmap.c:371
static HRESULT WINAPI BitmapImpl_GetResolution(IWICBitmap *iface, double *pDpiX, double *pDpiY)
Definition: bitmap.c:332
static HRESULT WINAPI BitmapImpl_SetResolution(IWICBitmap *iface, double dpiX, double dpiY)
Definition: bitmap.c:454
static HRESULT WINAPI BitmapImpl_CopyPixels(IWICBitmap *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
Definition: bitmap.c:361
static ULONG WINAPI BitmapImpl_Release(IWICBitmap *iface)
Definition: bitmap.c:281
static HRESULT WINAPI BitmapImpl_GetSize(IWICBitmap *iface, UINT *puiWidth, UINT *puiHeight)
Definition: bitmap.c:303
static HRESULT WINAPI BitmapImpl_SetPalette(IWICBitmap *iface, IWICPalette *pIPalette)
Definition: bitmap.c:425

Definition at line 468 of file bitmap.c.

Referenced by BitmapImpl_Create().

◆ BitmapLockImpl_Vtbl

const IWICBitmapLockVtbl BitmapLockImpl_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI BitmapLockImpl_QueryInterface(IWICBitmapLock *iface, REFIID iid, void **ppv)
Definition: bitmap.c:123
static HRESULT WINAPI BitmapLockImpl_GetDataPointer(IWICBitmapLock *iface, UINT *pcbBufferSize, BYTE **ppbData)
Definition: bitmap.c:203
static ULONG WINAPI BitmapLockImpl_Release(IWICBitmapLock *iface)
Definition: bitmap.c:157
static HRESULT WINAPI BitmapLockImpl_GetStride(IWICBitmapLock *iface, UINT *pcbStride)
Definition: bitmap.c:189
static HRESULT WINAPI BitmapLockImpl_GetSize(IWICBitmapLock *iface, UINT *puiWidth, UINT *puiHeight)
Definition: bitmap.c:174
static HRESULT WINAPI BitmapLockImpl_GetPixelFormat(IWICBitmapLock *iface, WICPixelFormatGUID *pPixelFormat)
Definition: bitmap.c:219
static ULONG WINAPI BitmapLockImpl_AddRef(IWICBitmapLock *iface)
Definition: bitmap.c:147

Definition at line 228 of file bitmap.c.

Referenced by BitmapImpl_Lock().

◆ enum_format

int enum_format

Definition at line 513 of file bitmap.c.

◆ IMILBitmapImpl_Vtbl

const IMILBitmapVtbl IMILBitmapImpl_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmap *iface, REFIID iid, void **ppv)
Definition: bitmap.c:482
static HRESULT WINAPI IMILBitmapImpl_unknown1(IMILBitmap *iface, void **ppv)
Definition: bitmap.c:588
static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmap *iface, IWICPalette *palette)
Definition: bitmap.c:572
static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmap *iface, const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
Definition: bitmap.c:580
static HRESULT WINAPI IMILBitmapImpl_SetPalette(IMILBitmap *iface, IWICPalette *palette)
Definition: bitmap.c:616
static HRESULT WINAPI IMILBitmapImpl_AddDirtyRect(IMILBitmap *iface, const WICRect *rc)
Definition: bitmap.c:630
static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmap *iface, int *format)
Definition: bitmap.c:539
static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmap *iface, double *dpix, double *dpiy)
Definition: bitmap.c:564
static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmap *iface, UINT *width, UINT *height)
Definition: bitmap.c:502
static HRESULT WINAPI IMILBitmapImpl_Lock(IMILBitmap *iface, const WICRect *rc, DWORD flags, IWICBitmapLock **lock)
Definition: bitmap.c:602
static ULONG WINAPI IMILBitmapImpl_AddRef(IMILBitmap *iface)
Definition: bitmap.c:490
static HRESULT WINAPI IMILBitmapImpl_Unlock(IMILBitmap *iface, IWICBitmapLock *lock)
Definition: bitmap.c:609
static ULONG WINAPI IMILBitmapImpl_Release(IMILBitmap *iface)
Definition: bitmap.c:496
static HRESULT WINAPI IMILBitmapImpl_SetResolution(IMILBitmap *iface, double dpix, double dpiy)
Definition: bitmap.c:623

Definition at line 636 of file bitmap.c.

Referenced by BitmapImpl_Create().

◆ IMILUnknown1Impl_Vtbl

const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI IMILUnknown1Impl_AddRef(IMILUnknown1 *iface)
Definition: bitmap.c:663
static HRESULT WINAPI IMILUnknown1Impl_unknown6(IMILUnknown1 *iface, DWORD64 arg)
Definition: bitmap.c:704
static HRESULT WINAPI IMILUnknown1Impl_unknown7(IMILUnknown1 *iface, void *arg)
Definition: bitmap.c:710
static HRESULT WINAPI IMILUnknown1Impl_unknown2(IMILUnknown1 *iface, void *arg1, void *arg2)
Definition: bitmap.c:680
static ULONG WINAPI IMILUnknown1Impl_Release(IMILUnknown1 *iface)
Definition: bitmap.c:669
static HRESULT WINAPI IMILUnknown1Impl_QueryInterface(IMILUnknown1 *iface, REFIID iid, void **ppv)
Definition: bitmap.c:654
static HRESULT WINAPI IMILUnknown1Impl_unknown5(IMILUnknown1 *iface, void *arg)
Definition: bitmap.c:698
HRESULT WINAPI IMILUnknown1Impl_unknown3(IMILUnknown1 *iface, void *arg)
Definition: bitmap.c:686
static HRESULT WINAPI IMILUnknown1Impl_unknown4(IMILUnknown1 *iface, void *arg)
Definition: bitmap.c:692
void WINAPI IMILUnknown1Impl_unknown1(IMILUnknown1 *iface, void *arg)
Definition: bitmap.c:675
#define THISCALL(func)
Definition: asm.h:153

Definition at line 726 of file bitmap.c.

Referenced by BitmapImpl_Create().

◆ IMILUnknown2Impl_Vtbl

const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IMILUnknown2Impl_QueryInterface(IMILUnknown2 *iface, REFIID iid, void **ppv)
Definition: bitmap.c:741
static HRESULT WINAPI IMILUnknown2Impl_unknown1(IMILUnknown2 *iface, void *arg1, void **arg2)
Definition: bitmap.c:761
static ULONG WINAPI IMILUnknown2Impl_AddRef(IMILUnknown2 *iface)
Definition: bitmap.c:749
static ULONG WINAPI IMILUnknown2Impl_Release(IMILUnknown2 *iface)
Definition: bitmap.c:755
static HRESULT WINAPI IMILUnknown2Impl_unknown2(IMILUnknown2 *iface, void *arg1, void *arg2)
Definition: bitmap.c:768
static HRESULT WINAPI IMILUnknown2Impl_unknown3(IMILUnknown2 *iface, void *arg1)
Definition: bitmap.c:774

Definition at line 780 of file bitmap.c.

Referenced by BitmapImpl_Create().

◆ 

const struct { ... } pixel_fmt_map[]
Initial value:
=
{
{ &GUID_WICPixelFormatDontCare, 0 },
{ &GUID_WICPixelFormat1bppIndexed, 1 },
{ &GUID_WICPixelFormat2bppIndexed, 2 },
{ &GUID_WICPixelFormat4bppIndexed, 3 },
{ &GUID_WICPixelFormat8bppIndexed, 4 },
{ &GUID_WICPixelFormatBlackWhite, 5 },
{ &GUID_WICPixelFormat2bppGray, 6 },
{ &GUID_WICPixelFormat4bppGray, 7 },
{ &GUID_WICPixelFormat8bppGray, 8 },
{ &GUID_WICPixelFormat16bppBGR555, 9 },
{ &GUID_WICPixelFormat16bppBGR565, 0x0a },
{ &GUID_WICPixelFormat16bppGray, 0x0b },
{ &GUID_WICPixelFormat24bppBGR, 0x0c },
{ &GUID_WICPixelFormat24bppRGB, 0x0d },
{ &GUID_WICPixelFormat32bppBGR, 0x0e },
{ &GUID_WICPixelFormat32bppBGRA, 0x0f },
{ &GUID_WICPixelFormat32bppPBGRA, 0x10 },
{ &GUID_WICPixelFormat48bppRGB, 0x15 },
{ &GUID_WICPixelFormat64bppRGBA, 0x16 },
{ &GUID_WICPixelFormat64bppPRGBA, 0x17 },
{ &GUID_WICPixelFormat32bppCMYK, 0x1c }
}

Referenced by IMILBitmapImpl_GetPixelFormat().

◆ WIC_format

const GUID* WIC_format

Definition at line 512 of file bitmap.c.

Referenced by IMILBitmapImpl_GetPixelFormat().