CMYK fix, and better calculated results

Skip to first unread message

John Bridges

May 10, 2012, 11:16:02 PM5/10/12
New build of AfterGRASP is up for download:
Thu, 10 May 2012

CMYK to RGB calculation fixed (had a typo which gave incorrect results)
CMYK to RGB calculation now uses RGB192 floating point result
CMYK to RGB lookup table interpolation now uses RGB192 floating point result

RGB to CMYK calculation drastically improved (not that awful murky
result the old algorithm provided) so that it gives decent results when
no lookup table is availble. The new algorithm is embarrassingly simple:

 cmyk.cyn =;
 cmyk.mag = rgb.grn;
 cmyk.ylw = rgb.blu;
 cmyk.blk = MAX(,rgb.grn,rgb.blu);

Yet the results are dramatically closer to the photoshop ideal produced
by the lookup table.

Tue, 24 April 2012

Arrays now support a add new item to beginning or end of array using
[-] for before beginning
[+] for after end

  test = array()
  test[+] = a
  test[+] = b
  test[+] = c
  test[+] = d
  test[-] = z
  test[-] = y

Same as:

  test[0] = a
  test[1] = b
  test[2] = c
  test[3] = d
  test[-1] = z
  test[-2] = y

This is very useful for adding items to a array. Previously the standard
method was to use the array size like this:

  test = array()
  test[test->size] = a
  test[test->size] = b
  test[test->size] = c
  test[test->size] = d

Much simpler and more robust to use [+] instead.


Reply all
Reply to author
0 new messages