| Previous | Next |
| WINCODEC_ERR_INTERNALERROR | WINCODEC_ERR_COMPONENTNOTFOUND |
WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS
WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS means that the rectangle supplied for a WIC bitmap operation does not agree with the bitmap dimensions required by that operation. It is often caused by stale dimensions after scaling, rotation, cropping, or a change of frame.
What to check
- Query width and height from the exact bitmap source used by the call, not from an earlier source in the transform chain.
- Validate
x + widthandy + heightwith overflow-safe arithmetic. - When an API requires a full-size rectangle, do not pass a crop rectangle merely because it fits inside the source.
Correct the rectangle calculation rather than retrying the same operation with the same source.
Microsoft: WIC transforms and bitmap sources
Looking for a different code? Search another status or error code.