vips_colourspace() could fail
for images with alpha channels
This commit is contained in:
parent
a01e2e3e13
commit
82f680484c
|
@ -1,7 +1,8 @@
|
||||||
19/10/13 started 7.37.0
|
19/10/13 started 7.37.0
|
||||||
- redone im_rotate_*mask45(), im_gauss_*mask*(), im_log_*mask(), im_dilate(),
|
- redone im_rotate_*mask45(), im_gauss_*mask*(), im_log_*mask(), im_dilate(),
|
||||||
im_erode(), im_rank_image(), im_compass(), im_linedet(), im_gradient(),
|
im_erode(), im_rank_image(), im_compass(), im_linedet(), im_gradient(),
|
||||||
im_convsep(), im_convsep_f(), im_fastcor(), im_spcor() as classes
|
im_convsep(), im_convsep_f(), im_fastcor(), im_spcor(), im_sharpen()
|
||||||
|
as classes
|
||||||
- im_gradcor() deprecated
|
- im_gradcor() deprecated
|
||||||
- vips_init() now does some ABI compat checking, though this change requires
|
- vips_init() now does some ABI compat checking, though this change requires
|
||||||
an ABI break
|
an ABI break
|
||||||
|
|
15
TODO
15
TODO
|
@ -1,10 +1,10 @@
|
||||||
- try:
|
|
||||||
|
|
||||||
$ vips colourspace Opera-icon-high-res.png x.v labs
|
- add vips_gaussian_blur() with approx / int / float precision, maybe
|
||||||
$ header x.v
|
vips_resize() as well?
|
||||||
x.v: 3056x3325 float, 4 bands, labs, pngload
|
|
||||||
|
|
||||||
o.O should be short innit?
|
could share a base class with vips_sharpen()/
|
||||||
|
|
||||||
|
- do morph quickly as simple wrappers over the vips7 operations
|
||||||
|
|
||||||
- support --strip for other writers
|
- support --strip for other writers
|
||||||
|
|
||||||
|
@ -20,11 +20,6 @@
|
||||||
|
|
||||||
note on memuse page
|
note on memuse page
|
||||||
|
|
||||||
- do conv and morph quickly as simple wrappers over the vips7 operations
|
|
||||||
|
|
||||||
- add vips_gaussian_blur() with approx / int / float precision, maybe
|
|
||||||
vips_resize() as well?
|
|
||||||
|
|
||||||
- do much fancier profiling with timing on all locks saved in memory and
|
- do much fancier profiling with timing on all locks saved in memory and
|
||||||
dumped on exit
|
dumped on exit
|
||||||
|
|
||||||
|
|
|
@ -481,12 +481,11 @@ vips_colour_code_build( VipsObject *object )
|
||||||
VipsColour *colour = VIPS_COLOUR( object );
|
VipsColour *colour = VIPS_COLOUR( object );
|
||||||
VipsColourCode *code = VIPS_COLOUR_CODE( object );
|
VipsColourCode *code = VIPS_COLOUR_CODE( object );
|
||||||
VipsColourCodeClass *class = VIPS_COLOUR_CODE_GET_CLASS( object );
|
VipsColourCodeClass *class = VIPS_COLOUR_CODE_GET_CLASS( object );
|
||||||
|
VipsImage **t = (VipsImage **) vips_object_local_array( object, 6 );
|
||||||
|
|
||||||
VipsImage **t;
|
|
||||||
VipsImage *in;
|
VipsImage *in;
|
||||||
VipsImage *extra;
|
VipsImage *extra;
|
||||||
|
|
||||||
t = (VipsImage **) vips_object_local_array( object, 5 );
|
|
||||||
|
|
||||||
in = code->in;
|
in = code->in;
|
||||||
extra = NULL;
|
extra = NULL;
|
||||||
|
@ -559,15 +558,19 @@ vips_colour_code_build( VipsObject *object )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
/* Reattach higher bands, if necessary.
|
/* Reattach higher bands, if necessary.
|
||||||
|
*
|
||||||
|
* Our processing on the first three bands may have changed the image
|
||||||
|
* format. For example, converting LAB to LABS will make a short
|
||||||
|
* image. We need to force the extra bands to match this new type.
|
||||||
*/
|
*/
|
||||||
if( extra ) {
|
if( extra ) {
|
||||||
VipsImage *x;
|
VipsImage *x;
|
||||||
|
|
||||||
if( vips_bandjoin2( colour->out, extra, &x, NULL ) )
|
if( vips_cast( extra, &t[5], colour->out->BandFmt, NULL ) ||
|
||||||
|
vips_bandjoin2( colour->out, t[5], &x, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
VIPS_UNREF( colour->out );
|
VIPS_UNREF( colour->out );
|
||||||
|
|
||||||
colour->out = x;
|
colour->out = x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue