I am trying to download an ICM profile profile file that is stored with the main ImageMagick configuration files (colors.xml, etc.) using RMagick. I want to make sure that I always provide the correct file path through deployments using slightly different settings and / or versions of ImageMagick. Is there a way to find this location from ImageMagick (something like Magick-config)?
This is what I have now, but it seems fragile:
MAGICK_PREFIX = `Magick-config --prefix`.strip!
MAGICK_VERSION = `Magick-config --version`.strip!.split(/\s/).first
RGB_COLOR_PROFILE = "#{MAGICK_PREFIX}/share/ImageMagick-#{MAGICK_VERSION}/config/sRGB.icm"
source
share