The rating is stored in the XMP block. This is a text block and it contains a statement like:
<xmp:rating>3</xmp:Rating>
I have written a library, that can only remove the XMP block. The removal is done, when you save the EXIF data of the image file using the method "Save" and passing the option parameter
"ExifSaveOptions.RemoveAdobeInfoBlock"
. But you can debug the Save method in order to see, how the XMP block is embedded into the JPEG file. And then you can write a method which reads the XMP block instead of removing it.
CompactExifLib: Access to EXIF Tags in JPEG Files[
^]
Best Regards
Hans-Peter