"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libvips/foreign/openexr2vips.c" between
vips-8.10.6.tar.gz and vips-8.11.0.tar.gz

About: VIPS is a free image processing system (see also the GUI nip2).

openexr2vips.c  (vips-8.10.6):openexr2vips.c  (vips-8.11.0)
skipping to change at line 229 skipping to change at line 229
FIXME ... not really scRGB, you should get the chromaticities FIXME ... not really scRGB, you should get the chromaticities
from the header and transform from the header and transform
*/ */
vips_image_init_fields( out, vips_image_init_fields( out,
read->window.width, read->window.height, 4, read->window.width, read->window.height, 4,
VIPS_FORMAT_FLOAT, VIPS_FORMAT_FLOAT,
VIPS_CODING_NONE, VIPS_INTERPRETATION_scRGB, 1.0, 1.0 ); VIPS_CODING_NONE, VIPS_INTERPRETATION_scRGB, 1.0, 1.0 );
if( read->tiles ) if( read->tiles )
vips_image_pipelinev( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL ); /* Even though this is a tiled reader, we hint thinstrip
* since with the cache we are quite happy serving that if
* anything downstream would like it.
*/
vips_image_pipelinev( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL );
else else
vips_image_pipelinev( out, VIPS_DEMAND_STYLE_FATSTRIP, NULL ); vips_image_pipelinev( out, VIPS_DEMAND_STYLE_FATSTRIP, NULL );
} }
int int
vips__openexr_read_header( const char *filename, VipsImage *out ) vips__openexr_read_header( const char *filename, VipsImage *out )
{ {
Read *read; Read *read;
if( !(read = read_new( filename, out )) ) if( !(read = read_new( filename, out )) )
skipping to change at line 366 skipping to change at line 370
{ {
Read *read; Read *read;
if( !(read = read_new( filename, out )) ) if( !(read = read_new( filename, out )) )
return( -1 ); return( -1 );
if( read->tiles ) { if( read->tiles ) {
VipsImage *raw; VipsImage *raw;
VipsImage *t; VipsImage *t;
/* Tile cache: keep enough for two complete rows of tiles. /* Tile cache: keep enough for two complete rows of tiles,
* plus 50%.
*/ */
raw = vips_image_new(); raw = vips_image_new();
vips_object_local( out, raw ); vips_object_local( out, raw );
read_header( read, raw ); read_header( read, raw );
if( vips_image_generate( raw, if( vips_image_generate( raw,
vips__openexr_start, vips__openexr_generate, NULL, vips__openexr_start, vips__openexr_generate, NULL,
read, NULL ) ) read, NULL ) )
return( -1 ); return( -1 );
/* Copy to out, adding a cache. Enough tiles for a complete
* row, plus 50%.
*/
if( vips_tilecache( raw, &t, if( vips_tilecache( raw, &t,
"tile_width", read->tile_width, "tile_width", read->tile_width,
"tile_height", read->tile_height, "tile_height", read->tile_height,
"max_tiles", (int) "max_tiles", (int)
(1.5 * (1 + raw->Xsize / read->tile_width)), (2.5 * (1 + raw->Xsize / read->tile_width)),
NULL ) ) NULL ) )
return( -1 ); return( -1 );
if( vips_image_write( t, out ) ) { if( vips_image_write( t, out ) ) {
g_object_unref( t ); g_object_unref( t );
return( -1 ); return( -1 );
} }
g_object_unref( t ); g_object_unref( t );
} }
else { else {
const int left = read->window.left; const int left = read->window.left;
 End of changes. 4 change blocks. 
6 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)