+1
+ if (!prc) + { + UINT width, height; + hr = IWICBitmapSource_GetSize(This->source, &width, &height); + if (FAILED(hr)) return hr; + rc.X = 0; + rc.Y = 0; + rc.Width = width; + rc.Height = height; + prc = &rc; + }
Any reason you didn't use this approach in the other functions?