Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
Add colorspace option
Browse files Browse the repository at this point in the history
  • Loading branch information
SamWhited committed May 24, 2015
1 parent f86bc99 commit 3d31abf
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion rawkit/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@
:dcraw: ``-H 5``
"""

raw_color = 0
"""Raw colorspace (unique to each camera)"""
srgb = 1
"""sRGB D65 (default colorspace)"""
adobe_rgb = 2
"""Adobe RGB (1998) D65"""
wide_gammut_rgb = 3
"""Wide Gamut RGB D65"""
kodak_prophoto_rgb = 4
"""Kodak ProPhoto RGB D65"""
xyz = 5
"""XYZ colorspace"""


class WhiteBalance(object):

Expand Down Expand Up @@ -81,7 +94,8 @@ class Options(object):
'_shot',
'_use_camera_matrix',
'_white_balance',
'_highlight_mode'
'_highlight_mode',
'_colorspace'
]
"""The options which are supported by this class."""

Expand All @@ -93,6 +107,30 @@ def __init__(self):
setattr(self, i, None)
self.white_balance = WhiteBalance(auto=True, camera=True)

@property
def colorspace(self):
"""
Sets the colorspace used for the output image. The following constants
may be used:
- :class:`rawkit.options.raw_color`
- :class:`rawkit.options.srgb`
- :class:`rawkit.options.adobe_rgb`
- :class:`rawkit.options.wide_gammut_rgb`
- :class:`rawkit.options.kodak_prophoto_rgb`
- :class:`rawkit.options.xyz`
:type: :class:`int`
:default: :class:`rawkit.options.srgb`
:dcraw: ``-o``
:libraw: :class:`rawkit.libraw.libraw_output_params_t.output_color`
"""
return self._colorspace

@colorspace.setter
def colorspace(self, value):
self._colorspace = value

@property
def highlight_mode(self):
"""
Expand Down

0 comments on commit 3d31abf

Please sign in to comment.