Minimal reproduction and workaround: https://github.com/megaslice/P1-RtfPipe-ArgumentNullException-repro
ImageUriGetter gets invoked with an argument with its Bytes property set to null. The default implementation of ImageUriGetter, i.e. DataUri, passes picture.Bytes straight to Convert.ToBase64String which, in turn, throws ArgumentNullException.
Ideally, one would expect the fHorizRule RTF \picprop property to be recognised and thus generate an HTML <hr> (rather than an <img>). At minimum, however, one would expect either that DataUri be able to handle picture.Bytes being null, or else that ImageUriGetter never be invoked with an argument whose Bytes property is null.
CC @coudy
Minimal reproduction and workaround: https://github.com/megaslice/P1-RtfPipe-ArgumentNullException-repro
ImageUriGettergets invoked with an argument with itsBytesproperty set tonull. The default implementation ofImageUriGetter, i.e.DataUri, passespicture.Bytesstraight toConvert.ToBase64Stringwhich, in turn, throwsArgumentNullException.Ideally, one would expect the
fHorizRuleRTF\picpropproperty to be recognised and thus generate an HTML<hr>(rather than an<img>). At minimum, however, one would expect either thatDataUribe able to handlepicture.Bytesbeingnull, or else thatImageUriGetternever be invoked with an argument whoseBytesproperty isnull.CC @coudy