libopenraw
rawfile.cpp
1 /*
2  * libopenraw - rawfile.cpp
3  *
4  * Copyright (C) 2008 Novell, Inc.
5  * Copyright (C) 2006-2016 Hubert Figuiere
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  */
21 
22 
23 #include <stddef.h>
24 #include <stdint.h>
25 
26 #include <cstring>
27 #include <map>
28 #include <string>
29 #include <functional>
30 #include <memory>
31 #include <utility>
32 #include <vector>
33 
34 #include <boost/algorithm/string.hpp>
35 
36 #include "trace.hpp"
37 
38 #include <libopenraw/metadata.h>
39 #include <libopenraw/cameraids.h>
40 #include <libopenraw/consts.h>
41 #include <libopenraw/debug.h>
42 
43 #include "rawfile.hpp"
44 #include "rawdata.hpp"
45 #include "thumbnail.hpp"
46 #include "metavalue.hpp"
47 
48 #include "io/stream.hpp"
49 #include "io/file.hpp"
50 #include "io/memstream.hpp"
51 #include "rawcontainer.hpp"
52 #include "tiffepfile.hpp"
53 #include "cr2file.hpp"
54 #include "neffile.hpp"
55 #include "orffile.hpp"
56 #include "arwfile.hpp"
57 #include "peffile.hpp"
58 #include "crwfile.hpp"
59 #include "erffile.hpp"
60 #include "dngfile.hpp"
61 #include "mrwfile.hpp"
62 #include "rw2file.hpp"
63 #include "raffile.hpp"
64 #include "exception.hpp"
65 #include "rawfile_private.hpp"
66 
67 #include "rawfilefactory.hpp"
68 
69 using std::string;
70 using namespace Debug;
71 
72 namespace OpenRaw {
73 
74 class BitmapData;
75 
76 using Internals::RawFileFactory;
77 
78 void init(void)
79 {
80  using namespace std::placeholders;
81 
82  static RawFileFactory fctcr2(OR_RAWFILE_TYPE_CR2,
83  std::bind(&Internals::Cr2File::factory, _1),
84  "cr2");
85  static RawFileFactory fctnef(OR_RAWFILE_TYPE_NEF,
86  std::bind(&Internals::NefFile::factory, _1),
87  "nef");
88  static RawFileFactory fctnrw(OR_RAWFILE_TYPE_NRW,
89  std::bind(&Internals::NefFile::factory, _1),
90  "nrw");
91  static RawFileFactory fctarw(OR_RAWFILE_TYPE_ARW,
92  std::bind(&Internals::ArwFile::factory, _1),
93  "arw");
94  static RawFileFactory fctorf(OR_RAWFILE_TYPE_ORF,
95  std::bind(&Internals::OrfFile::factory, _1),
96  "orf");
97  static RawFileFactory fctdng(OR_RAWFILE_TYPE_DNG,
98  std::bind(&Internals::DngFile::factory, _1),
99  "dng");
100  static RawFileFactory fctpef(OR_RAWFILE_TYPE_PEF,
101  std::bind(&Internals::PEFFile::factory, _1),
102  "pef");
103  static RawFileFactory fctcrw(OR_RAWFILE_TYPE_CRW,
104  std::bind(&Internals::CRWFile::factory, _1),
105  "crw");
106  static RawFileFactory fcterf(OR_RAWFILE_TYPE_ERF,
107  std::bind(&Internals::ERFFile::factory, _1),
108  "erf");
109  static RawFileFactory fctmrw(OR_RAWFILE_TYPE_MRW,
110  std::bind(&Internals::MRWFile::factory, _1),
111  "mrw");
112  static RawFileFactory fctraw(OR_RAWFILE_TYPE_RW2,
113  std::bind(&Internals::Rw2File::factory, _1),
114  "raw");
115  static RawFileFactory fctrw2(OR_RAWFILE_TYPE_RW2,
116  std::bind(&Internals::Rw2File::factory, _1),
117  "rw2");
118  static RawFileFactory fctraf(OR_RAWFILE_TYPE_RAF,
119  std::bind(&Internals::RafFile::factory, _1),
120  "raf");
121 }
122 
124 {
125 public:
126  Private(Type t)
127  : m_type(t),
128  m_type_id(OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_NONE, OR_TYPEID_UNKNOWN)),
129  m_sizes(),
130  m_cam_ids(NULL),
131  m_matrices(NULL)
132  {
133  }
134  ~Private()
135  {
136  for(auto value : m_metadata)
137  {
138  if(value.second) {
139  delete value.second;
140  }
141  }
142  }
144  Type m_type;
146  TypeId m_type_id;
148  std::vector<uint32_t> m_sizes;
149  Internals::ThumbLocations m_thumbLocations;
150  std::map<int32_t, MetaValue*> m_metadata;
151  const camera_ids_t *m_cam_ids;
152  const Internals::BuiltinColourMatrix* m_matrices;
153 };
154 
155 
156 const char **RawFile::fileExtensions()
157 {
158  init();
159 
160  return RawFileFactory::fileExtensions();
161 }
162 
163 
164 RawFile *RawFile::newRawFile(const char*_filename, RawFile::Type _typeHint)
165 {
166  init();
167 
168  Type type;
169  if (_typeHint == OR_RAWFILE_TYPE_UNKNOWN) {
170  type = identify(_filename);
171  }
172  else {
173  type = _typeHint;
174  }
175  LOGDBG1("factory size %ld\n", RawFileFactory::table().size());
176  auto iter = RawFileFactory::table().find(type);
177  if (iter == RawFileFactory::table().end()) {
178  LOGWARN("factory not found\n");
179  return NULL;
180  }
181  if (iter->second == NULL) {
182  LOGWARN("factory is NULL\n");
183  return NULL;
184  }
185  IO::Stream::Ptr f(new IO::File(_filename));
186  return iter->second(f);
187 }
188 
189 RawFile *RawFile::newRawFileFromMemory(const uint8_t *buffer,
190  uint32_t len,
191  RawFile::Type _typeHint)
192 {
193  init();
194  Type type;
195  if (_typeHint == OR_RAWFILE_TYPE_UNKNOWN) {
196  ::or_error err = identifyBuffer(buffer, len, type);
197  if(err != OR_ERROR_NONE) {
198  LOGERR("error identifying buffer\n");
199  return NULL;
200  }
201  }
202  else {
203  type = _typeHint;
204  }
205  auto iter = RawFileFactory::table().find(type);
206  if (iter == RawFileFactory::table().end()) {
207  LOGWARN("factory not found\n");
208  return NULL;
209  }
210  if (iter->second == nullptr) {
211  LOGWARN("factory is NULL\n");
212  return NULL;
213  }
214  IO::Stream::Ptr f(new IO::MemStream((void*)buffer, len));
215  return iter->second(f);
216 }
217 
218 
219 RawFile::Type RawFile::identify(const char*_filename)
220 {
221  const char *e = ::strrchr(_filename, '.');
222  if (e == NULL) {
223  LOGDBG1("Extension not found\n");
224  return OR_RAWFILE_TYPE_UNKNOWN;
225  }
226  std::string extension(e + 1);
227  if (extension.length() > 3) {
228  return OR_RAWFILE_TYPE_UNKNOWN;
229  }
230 
231  boost::to_lower(extension);
232 
233  RawFileFactory::Extensions & extensions = RawFileFactory::extensions();
234  auto iter = extensions.find(extension);
235  if (iter == extensions.end())
236  {
237  return OR_RAWFILE_TYPE_UNKNOWN;
238  }
239  return iter->second;
240 }
241 
242 ::or_error RawFile::identifyBuffer(const uint8_t* buff, size_t len,
243  RawFile::Type &_type)
244 {
245  _type = OR_RAWFILE_TYPE_UNKNOWN;
246  if(len <= 4) {
247  return OR_ERROR_BUF_TOO_SMALL;
248  }
249  if(memcmp(buff, "\0MRM", 4) == 0) {
250  _type = OR_RAWFILE_TYPE_MRW;
251  return OR_ERROR_NONE;
252  }
253  if(memcmp(buff, "II\x1a\0\0\0HEAPCCDR", 14) == 0) {
254  _type = OR_RAWFILE_TYPE_CRW;
255  return OR_ERROR_NONE;
256  }
257  if(memcmp(buff, "IIRO", 4) == 0) {
258  _type = OR_RAWFILE_TYPE_ORF;
259  return OR_ERROR_NONE;
260  }
261  if(memcmp(buff, "IIU\0", 4) == 0) {
262  _type = OR_RAWFILE_TYPE_RW2;
263  return OR_ERROR_NONE;
264  }
265  if(memcmp(buff, RAF_MAGIC, RAF_MAGIC_LEN) == 0) {
266  _type = OR_RAWFILE_TYPE_RAF;
267  return OR_ERROR_NONE;
268  }
269  if((memcmp(buff, "II\x2a\0", 4) == 0)
270  || (memcmp(buff, "MM\0\x2a", 4) == 0)) {
271  // TIFF based format
272  if(len >=12 ) {
273  if(memcmp(buff + 8, "CR\x2", 3) == 0) {
274  _type = OR_RAWFILE_TYPE_CR2;
275  return OR_ERROR_NONE;
276  }
277  }
278  if(len >= 8) {
279  IO::Stream::Ptr s(new IO::MemStream((void*)buff, len));
280  std::unique_ptr<Internals::TiffEpFile> f(new Internals::TiffEpFile(s, OR_RAWFILE_TYPE_TIFF));
281 
282  // Take into account DNG by checking the DNGVersion tag
283  const MetaValue *dng_version = f->getMetaValue(META_NS_TIFF | TIFF_TAG_DNG_VERSION);
284  if(dng_version) {
285  LOGDBG1("found DNG versions\n");
286  _type = OR_RAWFILE_TYPE_DNG;
287  return OR_ERROR_NONE;
288  }
289 
290  const MetaValue *makev = f->getMetaValue(META_NS_TIFF | EXIF_TAG_MAKE);
291  if(makev){
292  std::string makes = makev->getString(0);
293  if(makes == "NIKON CORPORATION") {
294  _type = OR_RAWFILE_TYPE_NEF;
295  }
296  else if(makes == "SEIKO EPSON CORP."){
297  _type = OR_RAWFILE_TYPE_ERF;
298  }
299  else if(makes == "PENTAX Corporation ") {
300  _type = OR_RAWFILE_TYPE_PEF;
301  }
302  else if(makes == "SONY ") {
303  _type = OR_RAWFILE_TYPE_ARW;
304  }
305  else if(makes == "Canon") {
306  _type = OR_RAWFILE_TYPE_CR2;
307  }
308  }
309  }
310 
311  }
312  return OR_ERROR_NONE;
313 }
314 
315 RawFile::RawFile(RawFile::Type _type)
316  : d(new Private(_type))
317 {
318 }
319 
320 
322 {
323  delete d;
324 }
325 
326 
327 RawFile::Type RawFile::type() const
328 {
329  return d->m_type;
330 }
331 
332 RawFile::TypeId RawFile::typeId()
333 {
334  if(d->m_type_id == 0) {
335  _identifyId();
336  }
337  return d->m_type_id;
338 }
339 
340 RawFile::TypeId RawFile::_typeId() const
341 {
342  return d->m_type_id;
343 }
344 
345 void RawFile::_setTypeId(RawFile::TypeId _type_id)
346 {
347  d->m_type_id = _type_id;
348 }
349 
350 const std::vector<uint32_t> & RawFile::listThumbnailSizes(void)
351 {
352  if (d->m_sizes.empty()) {
353  LOGDBG1("_enumThumbnailSizes init\n");
354  ::or_error ret = _enumThumbnailSizes(d->m_sizes);
355  if (ret != OR_ERROR_NONE) {
356  LOGDBG1("_enumThumbnailSizes failed\n");
357  }
358  }
359  return d->m_sizes;
360 }
361 
362 
363 ::or_error RawFile::getThumbnail(uint32_t tsize, Thumbnail & thumbnail)
364 {
365  ::or_error ret = OR_ERROR_NOT_FOUND;
366  uint32_t smallest_bigger = 0xffffffff;
367  uint32_t biggest_smaller = 0;
368  uint32_t found_size = 0;
369 
370  LOGDBG1("requested size %u\n", tsize);
371 
372  auto sizes(listThumbnailSizes());
373 
374  for (auto s : sizes) {
375  LOGDBG1("current iter is %u\n", s);
376  if (s < tsize) {
377  if (s > biggest_smaller) {
378  biggest_smaller = s;
379  }
380  }
381  else if(s > tsize) {
382  if(s < smallest_bigger) {
383  smallest_bigger = s;
384  }
385  }
386  else { // s == tsize
387  found_size = tsize;
388  break;
389  }
390  }
391 
392  if (found_size == 0) {
393  found_size = (smallest_bigger != 0xffffffff ?
394  smallest_bigger : biggest_smaller);
395  }
396 
397  if (found_size != 0) {
398  LOGDBG1("size %u found\n", found_size);
399  ret = _getThumbnail(found_size, thumbnail);
400  }
401  else {
402  // no size found, let's fail gracefuly
403  LOGDBG1("no size found\n");
404  ret = OR_ERROR_NOT_FOUND;
405  }
406 
407  return ret;
408 }
409 
413 ::or_error RawFile::_getThumbnail(uint32_t size, Thumbnail & thumbnail)
414 {
415  ::or_error ret = OR_ERROR_NOT_FOUND;
416  auto iter = d->m_thumbLocations.find(size);
417  if(iter != d->m_thumbLocations.end())
418  {
419  const Internals::ThumbDesc & desc = iter->second;
420  thumbnail.setDataType(desc.type);
421  uint32_t byte_length= desc.length;
422  uint32_t offset = desc.offset;
423 
424  LOGDBG1("Thumbnail at %u of %u bytes.\n", offset, byte_length);
425 
426  if (byte_length != 0) {
427  void *p = thumbnail.allocData(byte_length);
428  size_t real_size = getContainer()->fetchData(p, offset,
429  byte_length);
430  if (real_size < byte_length) {
431  LOGWARN("Size mismatch for data: got %lu expected %u ignoring.\n",
432  real_size, byte_length);
433  }
434 
435  thumbnail.setDimensions(desc.x, desc.y);
436  ret = OR_ERROR_NONE;
437  }
438  }
439 
440  return ret;
441 }
442 
443 void RawFile::_addThumbnail(uint32_t size, const Internals::ThumbDesc& desc)
444 {
445  d->m_thumbLocations[size] = desc;
446 }
447 
448 ::or_error RawFile::getRawData(RawData & rawdata, uint32_t options)
449 {
450  LOGDBG1("getRawData()\n");
451  ::or_error ret = _getRawData(rawdata, options);
452  if (ret != OR_ERROR_NONE) {
453  return ret;
454  }
455 
456  // if the colour matrix isn't copied already, do it now.
457  uint32_t matrix_size = 0;
458  if (!rawdata.getColourMatrix1(matrix_size) || !matrix_size) {
459  matrix_size = colourMatrixSize();
460  double *matrix = new double[matrix_size];
461  if (getColourMatrix1(matrix, matrix_size) == OR_ERROR_NONE) {
462  rawdata.setColourMatrix1(matrix, matrix_size);
463  }
464  delete [] matrix;
465  }
466 
467  return ret;
468 }
469 
470 ::or_error RawFile::getRenderedImage(BitmapData & bitmapdata, uint32_t options)
471 {
472  RawData rawdata;
473  LOGDBG1("options are %u\n", options);
474  ::or_error ret = getRawData(rawdata, options);
475  if(ret == OR_ERROR_NONE) {
476  ret = rawdata.getRenderedImage(bitmapdata, options);
477  }
478  return ret;
479 }
480 
481 
483 {
484  int32_t idx = 0;
485  const MetaValue * value = getMetaValue(META_NS_TIFF
486  | EXIF_TAG_ORIENTATION);
487  if(value == NULL) {
488  return 0;
489  }
490  try {
491  idx = value->getInteger(0);
492  }
493  catch(const Internals::BadTypeException & e) {
494  LOGDBG1("wrong type - %s\n", e.what());
495  }
496  return idx;
497 }
498 
500 {
501  return 9;
502 }
503 
504 ::or_error RawFile::getColourMatrix1(double* matrix, uint32_t & size)
505 {
506  return _getColourMatrix(1, matrix, size);
507 }
508 
509 ::or_error RawFile::getColourMatrix2(double* matrix, uint32_t & size)
510 {
511  return _getColourMatrix(2, matrix, size);
512 }
513 
514 ::or_error RawFile::_getColourMatrix(uint32_t index, double* matrix, uint32_t & size)
515 {
516  int32_t meta_index = 0;
517  switch(index) {
518  case 1:
519  meta_index = META_NS_TIFF | DNG_TAG_COLORMATRIX1;
520  break;
521  case 2:
522  meta_index = META_NS_TIFF | DNG_TAG_COLORMATRIX2;
523  break;
524  default:
525  size = 0;
526  return OR_ERROR_INVALID_PARAM;
527  }
528  const MetaValue* meta = getMetaValue(meta_index);
529 
530  if(!meta) {
531  if (index != 1) {
532  size = 0;
533  return OR_ERROR_INVALID_PARAM;
534  }
535  return _getBuiltinColourMatrix(d->m_matrices, typeId(), matrix, size);
536  }
537  uint32_t count = meta->getCount();
538  if(size < count) {
539  // return the expected size
540  size = count;
541  return OR_ERROR_BUF_TOO_SMALL;
542  }
543 
544  for(uint32_t i = 0; i < count; i++) {
545  matrix[i] = meta->getDouble(i);
546  }
547  size = count;
548 
549  return OR_ERROR_NONE;
550 }
551 
553 {
554  return _getCalibrationIlluminant(1);
555 }
556 
557 ExifLightsourceValue RawFile::getCalibrationIlluminant2()
558 {
559  return _getCalibrationIlluminant(2);
560 }
561 
562 ExifLightsourceValue RawFile::_getCalibrationIlluminant(uint16_t index)
563 {
564  int32_t meta_index = 0;
565  switch(index) {
566  case 1:
567  meta_index = META_NS_TIFF | DNG_TAG_CALIBRATION_ILLUMINANT1;
568  break;
569  case 2:
570  meta_index = META_NS_TIFF | DNG_TAG_CALIBRATION_ILLUMINANT2;
571  break;
572  default:
573  return EV_LIGHTSOURCE_UNKNOWN;
574  }
575  const MetaValue* meta = getMetaValue(meta_index);
576 
577  if(!meta) {
578  return (index == 1) ? EV_LIGHTSOURCE_D65 : EV_LIGHTSOURCE_UNKNOWN;
579  }
580  return (ExifLightsourceValue)meta->getInteger(0);
581 }
582 
583 const MetaValue *RawFile::getMetaValue(int32_t meta_index)
584 {
585  MetaValue *val = NULL;
586  auto iter = d->m_metadata.find(meta_index);
587  if(iter == d->m_metadata.end()) {
588  val = _getMetaValue(meta_index);
589  if(val != NULL) {
590  d->m_metadata[meta_index] = val;
591  }
592  }
593  else {
594  val = iter->second;
595  }
596  return val;
597 }
598 
599 
601 RawFile::_lookupCameraId(const camera_ids_t * map, const std::string& value)
602 {
603  const camera_ids_t * p = map;
604  if(!p) {
605  return NULL;
606  }
607  while(p->model) {
608  if(value == p->model) {
609  return p;
610  }
611  p++;
612  }
613  return NULL;
614 }
615 
616 RawFile::TypeId RawFile::_typeIdFromModel(const std::string & make,
617  const std::string & model)
618 {
619  const camera_ids_t * p = _lookupCameraId(d->m_cam_ids, model);
620  if (!p) {
621  return _typeIdFromMake(make);
622  }
623  return p->type_id;
624 }
625 
626 const RawFile::camera_ids_t RawFile::s_make[] = {
627  { "Canon", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_CANON, 0) },
628  { "NIKON CORPORATION", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_NIKON, 0) },
629  { "LEICA CAMERA AG ", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_LEICA, 0) },
630  { "Leica Camera AG", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_LEICA, 0) },
631  { "Panasonic", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_PANASONIC, 0) },
632  // Hardcoded
633  { "Minolta", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_MINOLTA, 0) },
634  { "FujiFilm", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_FUJIFILM, 0) },
635  { NULL, 0 }
636 };
637 
638 
639 RawFile::TypeId
640 RawFile::_typeIdFromMake(const std::string& make)
641 {
642  const camera_ids_t * p = _lookupCameraId(s_make, make);
643  if (!p) {
644  return 0;
645  }
646  return p->type_id;
647 }
648 
649 void RawFile::_setIdMap(const camera_ids_t *map)
650 {
651  d->m_cam_ids = map;
652 }
653 
655 RawFile::_getMatrices() const
656 {
657  return d->m_matrices;
658 }
659 
660 void RawFile::_setMatrices(const Internals::BuiltinColourMatrix* matrices)
661 {
662  d->m_matrices = matrices;
663 }
664 
665 ::or_error
666 RawFile::_getBuiltinLevels(const Internals::BuiltinColourMatrix* m,
667  TypeId type_id,
668  uint16_t & black, uint16_t & white)
669 {
670  if(!m) {
671  return OR_ERROR_NOT_FOUND;
672  }
673  while(m->camera) {
674  if(m->camera == type_id) {
675  black = m->black;
676  white = m->white;
677  return OR_ERROR_NONE;
678  }
679  ++m;
680  }
681  return OR_ERROR_NOT_FOUND;
682 }
683 
684 ::or_error
685 RawFile::_getBuiltinColourMatrix(const Internals::BuiltinColourMatrix* m,
686  TypeId type_id,
687  double* matrix,
688  uint32_t & size)
689 {
690  if(!m) {
691  return OR_ERROR_NOT_FOUND;
692  }
693  if(size < 9) {
694  return OR_ERROR_BUF_TOO_SMALL;
695  }
696 
697  while(m->camera) {
698  if(m->camera == type_id) {
699  for(int i = 0; i < 9; i++) {
700  matrix[i] = static_cast<double>(m->matrix[i]) / 10000.0;
701  }
702  size = 9;
703  return OR_ERROR_NONE;
704  }
705  ++m;
706  }
707  size = 0;
708  return OR_ERROR_NOT_FOUND;
709 }
710 
711 }
712 
713 /*
714  Local Variables:
715  mode:c++
716  c-file-style:"stroustrup"
717  c-file-offsets:((innamespace . 0))
718  indent-tabs-mode:nil
719  fill-column:80
720  End:
721 */
722 
size_t fetchData(void *buf, off_t offset, size_t buf_size)
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard. I guess it failed.
Definition: arwfile.cpp:30
::or_error getRenderedImage(BitmapData &bitmapdata, uint32_t options)
Definition: rawdata.cpp:125
::or_error getThumbnail(uint32_t size, Thumbnail &thumbnail)
Definition: rawfile.cpp:363
::or_error getRawData(RawData &rawdata, uint32_t options)
Definition: rawfile.cpp:448
::or_error getRenderedImage(BitmapData &bitmapdata, uint32_t options)
Definition: rawfile.cpp:470
ExifLightsourceValue getCalibrationIlluminant1()
Definition: rawfile.cpp:552
virtual ::or_error _getRawData(RawData &data, uint32_t options)=0
Type type() const
Definition: rawfile.cpp:327
void _setTypeId(TypeId _type_id)
Definition: rawfile.cpp:345
virtual ::or_error _enumThumbnailSizes(std::vector< uint32_t > &list)=0
virtual ::or_error _getColourMatrix(uint32_t index, double *matrix, uint32_t &size)
Definition: rawfile.cpp:514
::or_error getColourMatrix1(double *matrix, uint32_t &size)
Definition: rawfile.cpp:504
virtual void setDimensions(uint32_t x, uint32_t y)
Definition: bitmapdata.cpp:169
TypeId typeId()
Definition: rawfile.cpp:332
Definition: trace.cpp:30
virtual Internals::RawContainer * getContainer() const =0
const std::vector< uint32_t > & listThumbnailSizes(void)
Definition: rawfile.cpp:350
void setDataType(DataType _type)
Definition: bitmapdata.cpp:100
std::vector< uint32_t > m_sizes
Definition: rawfile.cpp:148
uint32_t colourMatrixSize()
Definition: rawfile.cpp:499
virtual ~RawFile()
Definition: rawfile.cpp:321
virtual ::or_error _getThumbnail(uint32_t size, Thumbnail &thumbnail)
Definition: rawfile.cpp:413
int32_t getOrientation()
Definition: rawfile.cpp:482
TypeId _typeId() const
Definition: rawfile.cpp:340
const double * getColourMatrix1(uint32_t &size) const
Definition: rawdata.cpp:211