stuff
This commit is contained in:
parent
ae3e22f393
commit
ed80e7fdd6
@ -42,6 +42,7 @@
|
||||
- added Matlab save file read
|
||||
- added Radiance file read
|
||||
- better file-not-found messages
|
||||
- im_magick2vips.c: allow funky bit depths, like 14 (thanks Mikkel)
|
||||
|
||||
11/9/08 started 7.16.3
|
||||
- oop typo in manpage for im_project()
|
||||
|
@ -20,6 +20,8 @@
|
||||
* - use MaxRGB if QuantumRange is missing (thanks Bob)
|
||||
* - look for MAGICKCORE_HDRI_SUPPORT (thanks Marcel)
|
||||
* - use image->attributes if GetNextImageAttribute() is missing
|
||||
* 3/3/09
|
||||
* - allow funky bit depths, like 14 (thanks Mikkel)
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -232,43 +234,31 @@ parse_header( Read *read )
|
||||
if( (im->Bands = get_bands( image )) < 0 )
|
||||
return( -1 );
|
||||
|
||||
switch( image->depth ) {
|
||||
case 8:
|
||||
im->BandFmt = IM_BANDFMT_UCHAR;
|
||||
im->Bbits = IM_BBITS_BYTE;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
im->BandFmt = IM_BANDFMT_USHORT;
|
||||
im->Bbits = IM_BBITS_SHORT;
|
||||
break;
|
||||
|
||||
#ifdef UseHDRI
|
||||
case 32:
|
||||
im->BandFmt = IM_BANDFMT_FLOAT;
|
||||
im->Bbits = IM_BBITS_FLOAT;
|
||||
break;
|
||||
|
||||
case 64:
|
||||
im->BandFmt = IM_BANDFMT_DOUBLE;
|
||||
im->Bbits = IM_BBITS_DOUBLE;
|
||||
break;
|
||||
#else /*!UseHDRI*/
|
||||
case 32:
|
||||
im->BandFmt = IM_BANDFMT_UINT;
|
||||
im->Bbits = IM_BBITS_INT;
|
||||
break;
|
||||
|
||||
/* No 64-bit int format in VIPS.
|
||||
/* Depth can be 'fractional'.
|
||||
*/
|
||||
im->BandFmt = -1;
|
||||
if( image->depth >= 1 && image->depth <= 8 )
|
||||
im->BandFmt = IM_BANDFMT_UCHAR;
|
||||
if( image->depth >= 9 && image->depth <= 16 )
|
||||
im->BandFmt = IM_BANDFMT_USHORT;
|
||||
#ifdef UseHDRI
|
||||
if( image->depth == 32 )
|
||||
im->BandFmt = IM_BANDFMT_FLOAT;
|
||||
if( image->depth == 64 )
|
||||
im->BandFmt = IM_BANDFMT_DOUBLE;
|
||||
#else /*!UseHDRI*/
|
||||
if( image->depth == 32 )
|
||||
im->BandFmt = IM_BANDFMT_UINT;
|
||||
#endif /*UseHDRI*/
|
||||
|
||||
default:
|
||||
if( im->BandFmt == -1 ) {
|
||||
im_error( "im_magick2vips", _( "unsupported bit depth %d" ),
|
||||
(int) image->depth );
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
im->Bbits = im_bits_of_fmt( im->BandFmt );
|
||||
|
||||
switch( image->colorspace ) {
|
||||
case GRAYColorspace:
|
||||
if( im->BandFmt == IM_BANDFMT_USHORT )
|
||||
|
Loading…
x
Reference in New Issue
Block a user