Perl Magick -set colorspace XYZ & -colorspace XYZ equivalents
I'm using PerlMagick to process a large number of large images. The process is broadly as follows:
Pipe converted (high gamut) raw files into and from dcraw.
Convert to "xyY" colorspace.
Convert to wide gamut RGB (e.g. PhotoPro).
I eventually discovered that the ->Set(colorspace=>"xyY") command (which is undocumented) works very much like the command line -colorspace xyY.
However, when piping the files from dcraw, PerlMagick always sees these as "sRGB" files, even if I use dcraw to output a wider gamut (or XYZ) format.
Having ducked the wider gamut issue, by importing from dcraw as sRGB then using ->Set(colorspace=>"xyY") has allowed me successfully develop the process workflow.
I now want to address the high gamut input requirement and import from dcraw in XYZ format. Is there an equivalent to the command line -set colorspace XYZ in perl magick which allows you to alter the colorspace tag WITHOUT doing a conversion (the ->Set(colorspace=>???) command assumes sRGB input and always does a conversion from an assumed sRGB colorspace when applied). I've tried a myriad of permutations and combinations - to no avail
I'd be grateful if anyone knows the syntax to mimic the -set colorspace command, or for a work around to allow IM to recognise the dcraw output as XYZ format.
(There seem to be a number of unresolved comments on the forum regarding the issue of whether PerlMagic's Set command emulates the command line -Set command or the -define command).
Version: ImageMagick 7.0.2-4 Q16 x86_64 2016-09-15