diff options
| author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2014-12-23 15:06:23 +0000 |
|---|---|---|
| committer | Matthieu Darbois <mayeut@users.noreply.github.com> | 2014-12-23 15:06:23 +0000 |
| commit | 81abe5b3bb652d99d6a0746f8b405feef4d1f7e6 (patch) | |
| tree | 2a6b08ef8f65e1c9e46a4e0aac35439369fc0c1c /src | |
| parent | 4a09296771c5e99c2fe14127515f9762bfe78a3b (diff) | |
[trunk] fixed imagetoraw unsigned 16bits conversion (fixes issue 460)
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/jp2/convert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c index 3de635be..4273141f 100644 --- a/src/bin/jp2/convert.c +++ b/src/bin/jp2/convert.c @@ -2586,7 +2586,7 @@ static int imagetoraw_common(opj_image_t * image, const char *outfile, OPJ_BOOL for (line = 0; line < h; line++) { for(row = 0; row < w; row++) { curr = *ptr; - if(curr > 65536 ) curr = 65536; else if( curr < 0) curr = 0; + if(curr > 65535 ) curr = 65535; else if( curr < 0) curr = 0; uc16.val = (unsigned short)(curr & mask); res = fwrite(uc16.vals, 1, 2, rawFile); if( res < 2 ) { |
