318{
321 GUID src_pixelformat;
322
323 TRACE(
"(%p,%p,%u,%u,%u)\n", iface, pISource, uiWidth, uiHeight,
mode);
324
325 if (!pISource || !uiWidth || !uiHeight)
327
329
331 {
334 }
335
336 This->width = uiWidth;
337 This->height = uiHeight;
339
340 hr = IWICBitmapSource_GetSize(pISource, &
This->src_width, &
This->src_height);
341
343 hr = IWICBitmapSource_GetPixelFormat(pISource, &src_pixelformat);
344
346 {
348 }
349
351 {
353 {
354 default:
356
358 if ((
This->bpp % 8) == 0)
359 {
360 IWICBitmapSource_AddRef(pISource);
361 This->source = pISource;
362 }
363 else
364 {
366 pISource, &
This->source);
368 }
371 break;
372 }
373 }
374
377
379}
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