Hello,
Please note this exception:
Delphi 12 64 bit.

Some times the assertion:
Assert(x*factor <{=} ImgWidth, 'x:'+ IntToStr(x)+ '. factor:'+ IntToStr(factor)+ '. w:'+ IntToStr(ImgWidth)); // here was: x*factor < w
is raised. I guess that the condition should be <=
Best regards.