Here is the updated source code of RichViewXML:
https://www.trichview.com/support/files ... xmlpas.zip
Replace files in <TRichView Dir>\RvXML\Source\
Then you can recompile the packages (the simplest way is running "Install TRichView in Delphi IDE" in Windows Start menu).
This version includes the fixes that we discussed.
As for pictures. Now, the same procedure is applied both for RVF and XML files.
The default behavior: trying to use a graphic class specified in a file. If this class is not available/registered, detecting class by content.
You can modify it by including rvfoIgnoreGraphicClasses in RVFOptions. In this mode, a graphic class specified in a file is ignored, graphic class is detected by content.
Now, what is "graphic class is defined by content"?
1) When loading graphic from a stream, RVGraphicHandler.LoadFromStream method is used (RVGrHandler.pas)
This method tries to detect a graphic type by content (currently, it can detect Bitmap, Icon, Metafile, JPEG, PNG, GIF, TIFF, AnyMap, SVG), and choose a graphic class selected for this format. By default, a class for Png is TPNGImage. You can assign another class for PNG by calling RVGraphicHandler.RegisterPngGraphic(<png class>).
2) When loading from a file, RVGraphicHandler.LoadFromFile method is used.
This method tries two approaches.
First, it loads using TPicture.LoadFromFile, which uses associations between graphic classes and file extensions (TPicture.RegisterFileFormat)
If loading failed, it uses RVGraphicHandler.LoadFromStream, see above.
Now I think that these approaches must be swapped: first we should use RVGraphicHandler.LoadFromStream, and use TPicture.LoadFromFile only if it fails. This change will be included in the next TRichView update.