Module: Idml::Render::IccProfile
- Defined in:
- lib/idml/render/icc_profile.rb
Overview
Locates an sRGB ICC profile for PDF/A output intent embedding. The idml gem does not bundle a binary ICC asset; instead, this helper probes a small set of well-known locations in priority order and returns the first match as raw bytes.
Priority:
1. `ENV["IDML_SRGB_ICC"]`
Returns nil when no profile is available — callers (Pipeline)
should skip ICC embedding in that case rather than raising.
Constant Summary collapse
- GEM_DATA_PATH =
File.("../../../data/idml/srgb.icc", __dir__)
- MACOS_SYSTEM_PATH =
"/System/Library/ColorSync/Profiles/sRGB Profile.icc"
Class Method Summary collapse
Class Method Details
.srgb_bytes ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/idml/render/icc_profile.rb', line 22 def self.srgb_bytes candidate_paths.each do |path| bytes = read_if_present(path) return bytes if bytes end nil end |