2011年6月28日火曜日

イメージを描画する(10)

あなたの瞳の色が僕の中でどんな色で見えているのか伝えたい、写真家にもそんなときってあると思います。というわけでこんなものを作ります。


このイメージを
こう表示する。



-- 途中です。改訂します。 --

/* めも
RGB のカラー・ガモット(color gamut)の各頂点を情報(三刺激値?)を取得する。
プロファイルのデータから rXYZ, gXYZ, bXYZ を得る。

Specification ICC.1:2004-10-10 (Profile Version 4.2.0.0)
redMatrixColumnTag, greenMatrixColumnTag and blueMatrixColumnTag は XYZType.
     -- XYZType Encoding --
     0-3    4byte   'XYZ ' type sigunature.
     4-7    4Byte   reserved, must be set to 0.
     8-end    -     an array of XYZ number. XYZNumber
    
     -- XYZ Number --
     0-3    4Byte   CIE X   s15Fixed16Number
     4-7    4Byte   CIE Y   s15Fixed16Number
     8-11   4Byte   CIE Z   s15Fixed16Number
    
     -- s15Fixed16Number --
     Number                 Encoding
     -32768.0               80000000h
     0                      00000000h
     1.0                    00010000h
     32767 + (65535/65536)  7FFFFFFFh
前半分が符号付き整数、後ろ半分が小数だけど、整数値を65536で割った値。つまり
iiiiiiiiiiiiiiii + ffffffffffffffff / 65536

7 Profile requirements
a)    All profile data shall be encoded as big-endian,

ColorSync Manager API 
CMGetPartialProfileElement //ColorSyncDeprecated.h 非推奨
 elementData の値がリトルエンディアンで戻ったので EndianS32_BtoN にかけた。

*/

0 件のコメント:

コメントを投稿