/*
- * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
- * Copyright (c) 2002-2007, Professor Benoit Macq
+ * The copyright in this software is being made available under the 2-clauses
+ * BSD License, included below. This software may be subject to other third
+ * party and contributor rights, including patent rights, and no such rights
+ * are granted under this license.
+ *
+ * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
+ * Copyright (c) 2002-2014, Professor Benoit Macq
* Copyright (c) 2001-2003, David Janssens
* Copyright (c) 2002-2003, Yannick Verschueren
- * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
+ * Copyright (c) 2003-2007, Francois-Olivier Devaux
+ * Copyright (c) 2003-2014, Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* Copyright (c) 2006-2007, Parvatha Elangovan
* All rights reserved.
int has_alpha = 0;
unsigned short tiBps, tiPhoto, tiSf, tiSpp, tiPC;
unsigned int tiWidth, tiHeight;
+ OPJ_BOOL is_cinema = OPJ_IS_CINEMA(parameters->rsiz);
tif = TIFFOpen(filename, "r");
*/
memset(&cmptparm[0], 0, 4 * sizeof(opj_image_cmptparm_t));
- if ((tiPhoto == PHOTOMETRIC_RGB) && (parameters->cp_cinema)) {
+ if ((tiPhoto == PHOTOMETRIC_RGB) && (is_cinema)) {
fprintf(stdout,"WARNING:\n"
"Input image bitdepth is %d bits\n"
"TIF conversion has automatically rescaled to 12-bits\n"
/*#define USETILEMODE*/
for(j = 0; j < numcomps; j++)
{
- if(parameters->cp_cinema)
+ if(is_cinema)
{
cmptparm[j].prec = 12;
cmptparm[j].bpp = 12;
if(has_alpha)
image->comps[3].data[index] = ( dat8[i+7] << 8 ) | dat8[i+6];
- if(parameters->cp_cinema)
+ if(is_cinema)
{
/* Rounding 16 to 12 bits
*/
image->comps[3].data[index] = dat8[i+3];
#endif
- if(parameters->cp_cinema)
+ if(is_cinema)
{
/* Rounding 8 to 12 bits
*/