As I mentioned earlier, I suggest approaching the problem from the "opposite" direction.
That is, instead of trying to extract icons from the artifact slots in the inventory, we should extract a portion of the window from the "hero-inventory" section, cropped specifically to the area where equipped artifacts are displayed. Perhaps it's a 500x500 pixel area.
In this way, the game is already programmed by the developers to display information about equipped artifacts in the hero-inventory window, and we will simply teach it to display a portion of this "window-screen/hero-inventory" in another location as well.
A rough version, but it doesn't work either.