Merge branch '8.10'
This commit is contained in:
commit
09e0d5bff6
@ -19,6 +19,7 @@
|
|||||||
- add missing flushes on write to target [harukizaemon]
|
- add missing flushes on write to target [harukizaemon]
|
||||||
- hide info messages you could get with some older glibs [kleisauke]
|
- hide info messages you could get with some older glibs [kleisauke]
|
||||||
- fix --no-strip on dzsave with icc-profiles [altert]
|
- fix --no-strip on dzsave with icc-profiles [altert]
|
||||||
|
- better GraphicsMagick image write [bfriesen]
|
||||||
|
|
||||||
6/9/20 started 8.10.2
|
6/9/20 started 8.10.2
|
||||||
- update magicksave/load profile handling [kelilevi]
|
- update magicksave/load profile handling [kelilevi]
|
||||||
|
@ -987,11 +987,15 @@ vips_foreign_load_heif_read( void *data, size_t size, void *userdata )
|
|||||||
{
|
{
|
||||||
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) userdata;
|
VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) userdata;
|
||||||
|
|
||||||
gint64 result;
|
while( size > 0 ) {
|
||||||
|
gint64 result;
|
||||||
|
|
||||||
result = vips_source_read( heif->source, data, size );
|
result = vips_source_read( heif->source, data, size );
|
||||||
if( result < 0 )
|
if( result <= 0 )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
size -= result;
|
||||||
|
}
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
@ -458,13 +458,21 @@ vips_foreign_load_ppm_generate_binary( VipsRegion *or,
|
|||||||
for( y = 0; y < r->height; y++ ) {
|
for( y = 0; y < r->height; y++ ) {
|
||||||
VipsPel *q = VIPS_REGION_ADDR( or, 0, r->top + y );
|
VipsPel *q = VIPS_REGION_ADDR( or, 0, r->top + y );
|
||||||
|
|
||||||
size_t bytes_read;
|
size_t n_bytes;
|
||||||
|
|
||||||
bytes_read = vips_source_read( ppm->source, q, sizeof_line );
|
n_bytes = sizeof_line;
|
||||||
if( bytes_read != sizeof_line ) {
|
while( n_bytes > 0 ) {
|
||||||
vips_error( class->nickname,
|
size_t bytes_read;
|
||||||
"%s", _( "file truncated" ) );
|
|
||||||
return( -1 );
|
bytes_read = vips_source_read( ppm->source,
|
||||||
|
q, sizeof_line );
|
||||||
|
if( bytes_read == 0 ) {
|
||||||
|
vips_error( class->nickname,
|
||||||
|
"%s", _( "file truncated" ) );
|
||||||
|
return( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
n_bytes -= bytes_read;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,13 +94,18 @@ vips_foreign_load_png_stream( spng_ctx *ctx, void *user,
|
|||||||
{
|
{
|
||||||
VipsSource *source = VIPS_SOURCE( user );
|
VipsSource *source = VIPS_SOURCE( user );
|
||||||
|
|
||||||
gint64 bytes_read;
|
while( length > 0 ) {
|
||||||
|
gint64 bytes_read;
|
||||||
|
|
||||||
bytes_read = vips_source_read( source, dest, length );
|
bytes_read = vips_source_read( source, dest, length );
|
||||||
if( bytes_read < 0 )
|
if( bytes_read < 0 )
|
||||||
return( SPNG_IO_ERROR );
|
return( SPNG_IO_ERROR );
|
||||||
if( bytes_read < length )
|
if( bytes_read == 0 )
|
||||||
return( SPNG_IO_EOF);
|
return( SPNG_IO_EOF );
|
||||||
|
|
||||||
|
dest += bytes_read;
|
||||||
|
length -= bytes_read;
|
||||||
|
}
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user