How is an ICC profile embedded or built into an image? If I were to analyze or change an ICC profile embedded in an image, how should I proceed?

I'd also be glad to understand how an "end-user" is able to create these with a tristimulus colorimeter or a spectrophotometer and if/how this new profile can be added to a color capturing device (i.e. a camera).

My curiosity comes from images that were taken by a professional photographer. When I open them in GIMP, there's a pop-up referring "there is an embedded ICC profile" and if I "would like to convert the image to RGB (sRGB built-in)". I always convert all of them before using them, since the colors are slightly improved.

This is the image as it was provided by the photographer:


And this is after the embedded ICC profile was applied:
I realized that littlecms, suggested by joojaa in a comment above is very complete in dealing with the ICC profiles.

I did a few tests in their color translator program with different destination color spaces and the differences are great as you can see:

Original



sRGB-like



adobeRGB1998 (it seems it's the original color space)



appleRGB



And the most desirable results in my case are within the ProPhotoRGB color space:



linearProPhotoRGB



All of the above were following an automatic rendering intent but other intents bring slight variations (samples applied together with linearProPhotoRGB destination color space):

Absolute Colorimetric



Legacy Unadapted Absolute Colorimetric



I also realized that GIMP was actually restoring the original profile (not the opposite as I thought, i.e. instead of applying an embedded ICC profile, it was taking it off) and with this littlecms, now it does seem much simpler to "translate" color spaces than I thought.