[fix] Allow to convert 3/5/7/9/11/13/15 bpp JP2 files to TIF
This commit is contained in:
parent
5c5ae1d51a
commit
9399e26291
|
@ -223,6 +223,12 @@ int imagetotif(opj_image_t * image, const char *outfile)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Store 3-bits input as 4-bits TIFF, 5-bits as 6-bits, etc... */
|
||||
if ( (bps != 1) && (bps & 1) )
|
||||
{
|
||||
bps += 1;
|
||||
}
|
||||
|
||||
if((bps > 16) || ((bps != 1) && (bps & 1))) bps = 0;
|
||||
if(bps == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue