summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@mines-paris.org>2017-08-11 15:13:35 +0200
committerGitHub <noreply@github.com>2017-08-11 15:13:35 +0200
commit0b4c3ce75d11600ebc6675bd871f78ca3c95bc60 (patch)
tree6d41f14da96481dd4f234ee887c6958095b8f60e /src
parenta35b4891340dcecf2b248c7e57a90bf7d7aa9b2f (diff)
parent9f750884f91a4f1b9ca3e6a401057c21a7e2bd99 (diff)
Merge pull request #980 from szukw000/changes-for-ppc64-converttif
Changes in converttif.c for PPC64
Diffstat (limited to 'src')
-rw-r--r--src/bin/jp2/converttif.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/jp2/converttif.c b/src/bin/jp2/converttif.c
index 4d2ed5a1..895b482f 100644
--- a/src/bin/jp2/converttif.c
+++ b/src/bin/jp2/converttif.c
@@ -568,7 +568,8 @@ int imagetotif(opj_image_t * image, const char *outfile)
{
TIFF *tif;
tdata_t buf;
- uint32 width, height, bps, tiPhoto;
+ uint32 width, height;
+ uint16 bps, tiPhoto;
int adjust, sgnd;
int64_t strip_size, rowStride, TIFF_MAX;
OPJ_UINT32 i, numcomps;
@@ -577,7 +578,7 @@ int imagetotif(opj_image_t * image, const char *outfile)
convert_32s_PXCX cvtPxToCx = NULL;
convert_32sXXx_C1R cvt32sToTif = NULL;
- bps = (uint32)image->comps[0].prec;
+ bps = (uint16)image->comps[0].prec;
planes[0] = image->comps[0].data;
numcomps = image->numcomps;
@@ -692,7 +693,7 @@ int imagetotif(opj_image_t * image, const char *outfile)
TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width);
TIFFSetField(tif, TIFFTAG_IMAGELENGTH, height);
- TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint32)numcomps);
+ TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, (uint16)numcomps);
TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps);
TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
@@ -1254,7 +1255,8 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
opj_image_cmptparm_t cmptparm[4]; /* RGBA */
opj_image_t *image = NULL;
int has_alpha = 0;
- uint32 tiBps, tiPhoto, tiSf, tiSpp, tiPC, tiWidth, tiHeight;
+ uint16 tiBps, tiPhoto, tiSf, tiSpp, tiPC;
+ uint32 tiWidth, tiHeight;
OPJ_BOOL is_cinema = OPJ_IS_CINEMA(parameters->rsiz);
convert_XXx32s_C1R cvtTifTo32s = NULL;
convert_32s_CXPX cvtCxToPx = NULL;