test reading gamma ramps

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix infinite recursion caused by calling wrong function

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix float to integer overflow

Signed-off-by: Mattias Andrée <maandree@operamail.com>
fix which ramps are getting calloc

Signed-off-by: Mattias Andrée <maandree@operamail.com>