summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-03-30 23:08:54 +0100
committerCarl Hetherington <cth@carlh.net>2017-03-30 23:08:54 +0100
commitb0b10b50e5a9a21e54459369b9e6eba2b7dd44a3 (patch)
tree202ecf605396db022c8f608ed87cf8e0c7be59c3 /src
parent47c65b4db31a821c4c0934d0dcc88970423980c3 (diff)
Add stride parameter to dcp::xyz_to_rgba.
Diffstat (limited to 'src')
-rw-r--r--src/rgb_xyz.cc6
-rw-r--r--src/rgb_xyz.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc
index 1110accb..b4307756 100644
--- a/src/rgb_xyz.cc
+++ b/src/rgb_xyz.cc
@@ -67,7 +67,8 @@ void
dcp::xyz_to_rgba (
boost::shared_ptr<const OpenJPEGImage> xyz_image,
ColourConversion const & conversion,
- uint8_t* argb
+ uint8_t* argb,
+ int stride
)
{
int const max_colour = pow (2, 16) - 1;
@@ -134,8 +135,7 @@ dcp::xyz_to_rgba (
*argb_line++ = 0xff;
}
- /* 4 bytes per pixel */
- argb += width * 4;
+ argb += stride;
}
}
diff --git a/src/rgb_xyz.h b/src/rgb_xyz.h
index 51846083..907869af 100644
--- a/src/rgb_xyz.h
+++ b/src/rgb_xyz.h
@@ -46,7 +46,8 @@ class ColourConversion;
extern void xyz_to_rgba (
boost::shared_ptr<const OpenJPEGImage>,
ColourConversion const & conversion,
- uint8_t* rgba
+ uint8_t* rgba,
+ int stride
);
extern void xyz_to_rgb (