320{
323 GUID src_pixelformat;
324
325 TRACE(
"(%p,%p,%u,%u,%u)\n", iface, pISource, uiWidth, uiHeight,
mode);
326
327 if (!pISource || !uiWidth || !uiHeight)
329
331
333 {
336 }
337
338 This->width = uiWidth;
339 This->height = uiHeight;
341
342 hr = IWICBitmapSource_GetSize(pISource, &
This->src_width, &
This->src_height);
343
345 hr = IWICBitmapSource_GetPixelFormat(pISource, &src_pixelformat);
346
348 {
350 }
351
353 {
355 {
356 default:
358
360 if ((
This->bpp % 8) == 0)
361 {
362 IWICBitmapSource_AddRef(pISource);
363 This->source = pISource;
364 }
365 else
366 {
368 pISource, &
This->source);
370 }
373 break;
374 }
375 }
376
379
381}
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp)
static void NearestNeighbor_CopyScanline(BitmapScaler *This, UINT dst_x, UINT dst_y, UINT dst_width, BYTE **src_data, UINT src_data_x, UINT src_data_y, BYTE *pbBuffer)
static void NearestNeighbor_GetRequiredSourceRect(BitmapScaler *This, UINT x, UINT y, WICRect *src_rect)
@ WICBitmapInterpolationModeNearestNeighbor
#define WINCODEC_ERR_WRONGSTATE