Merge remote-tracking branch 'origin/7.40'

Conflicts:
	ChangeLog
	configure.ac
This commit is contained in:
John Cupitt 2014-10-27 13:47:17 +00:00
commit c56e23e3c2
2 changed files with 13 additions and 6 deletions

View File

@ -20,6 +20,9 @@
- added autorot operator
- added @filter option to pngsave (Lovell)
27/10/14 started 7.40.12
- better tiff detection (Lovell)
8/10/14 started 7.40.11
- rework extra band handling for colour functions
- set interpretation of matlut output more carefully

View File

@ -148,6 +148,8 @@
* - add read from buffer
* 30/4/14
* - 1/2/4 bit palette images can have alpha
* 27/10/14 Lovell
* - better istiff detector spots bigtiff
*/
/*
@ -1904,9 +1906,11 @@ vips__istiff_buffer( void *buf, size_t len )
{
char *str = (char *) buf;
if( len >= 2 &&
((str[0] == 'M' && str[1] == 'M') ||
(str[0] == 'I' && str[1] == 'I')) )
if( len >= 4 &&
((str[0] == 'M' && str[1] == 'M' &&
str[2] == '\0' && (str[3] == '*' || str[3] == '+')) ||
(str[0] == 'I' && str[1] == 'I' &&
(str[2] == '*' || str[2] == '+') && str[3] == '\0')) )
return( TRUE );
return( FALSE );
@ -1915,10 +1919,10 @@ vips__istiff_buffer( void *buf, size_t len )
gboolean
vips__istiff( const char *filename )
{
unsigned char buf[2];
unsigned char buf[4];
if( vips__get_bytes( filename, buf, 2 ) &&
vips__istiff_buffer( buf, 2 ) )
if( vips__get_bytes( filename, buf, 4 ) &&
vips__istiff_buffer( buf, 4 ) )
return( TRUE );
return( FALSE );