That's a pretty esoteric question. 🙂
You have to navigate 2 different changes;
* The change of name from the old forge mappings to the mojang mappings
* The change of graphics engine
Here's how you can do it:
Find where your method is used in vanilla, e.g. in 1.12 with the stable_39 mappings this is SimpleTexture.loadTexture()
Find the same processing in 1.19 which also happens to be called SimpleTexture.
Now compare the 1.12 vanilla code with the 1.19 version, so you can determine the modern way to do your processing.
It won't always be as "easy" as this. Sometimes you would have to repeat the process.
e.g. If you couldn't find SimpleTexture in 1.19, find where SimpleTexture.loadTexture() is called and locate that processing in 1.19
However, in this case, you can already think of something that loads "external images". Minecraft player skins.
So you can look at and adapt what that does - SkinManager