summaryrefslogtreecommitdiff
path: root/src/stereo_picture_frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/stereo_picture_frame.cc')
-rw-r--r--src/stereo_picture_frame.cc36
1 files changed, 5 insertions, 31 deletions
diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc
index 0eae7583..ac7d7bf1 100644
--- a/src/stereo_picture_frame.cc
+++ b/src/stereo_picture_frame.cc
@@ -19,7 +19,6 @@
#include "stereo_picture_frame.h"
#include "exceptions.h"
-#include "argb_image.h"
#include "util.h"
#include "rgb_xyz.h"
#include "colour_conversion.h"
@@ -67,43 +66,18 @@ StereoPictureFrame::~StereoPictureFrame ()
* @param reduce a factor by which to reduce the resolution
* of the image, expressed as a power of two (pass 0 for no
* reduction).
- *
- * @return An ARGB representation of one of the eyes (left or right)
- * of this frame. This is ARGB in the Cairo sense, so that each
- * pixel takes up 4 bytes; the first byte is blue, second green,
- * third red and fourth alpha (always 255).
- *
*/
-shared_ptr<ARGBImage>
-StereoPictureFrame::argb_image (Eye eye, int reduce) const
+shared_ptr<XYZImage>
+StereoPictureFrame::xyz_image (Eye eye, int reduce) const
{
- shared_ptr<XYZImage> xyz_image;
switch (eye) {
case LEFT:
- xyz_image = decompress_j2k (const_cast<uint8_t*> (_buffer->Left.RoData()), _buffer->Left.Size(), reduce);
- break;
+ return decompress_j2k (const_cast<uint8_t*> (_buffer->Left.RoData()), _buffer->Left.Size(), reduce);
case RIGHT:
- xyz_image = decompress_j2k (const_cast<uint8_t*> (_buffer->Right.RoData()), _buffer->Right.Size(), reduce);
- break;
+ return decompress_j2k (const_cast<uint8_t*> (_buffer->Right.RoData()), _buffer->Right.Size(), reduce);
}
- return xyz_to_rgba (xyz_image, ColourConversion::xyz_to_srgb ());
-}
-
-void
-StereoPictureFrame::rgb_frame (Eye eye, shared_ptr<Image> image) const
-{
- shared_ptr<XYZImage> xyz_image;
- switch (eye) {
- case LEFT:
- xyz_image = decompress_j2k (const_cast<uint8_t*> (_buffer->Left.RoData()), _buffer->Left.Size(), 0);
- break;
- case RIGHT:
- xyz_image = decompress_j2k (const_cast<uint8_t*> (_buffer->Right.RoData()), _buffer->Right.Size(), 0);
- break;
- }
-
- return xyz_to_rgb (xyz_image, ColourConversion::xyz_to_srgb (), image);
+ return shared_ptr<XYZImage> ();
}
uint8_t const *