im_falsecolour() does implicit conversion
convert input automatically to mono 8-bit in falsecolour
This commit is contained in:
parent
c78e3382fc
commit
e84640af58
@ -69,6 +69,7 @@
|
|||||||
- VIPS_EXEEXT is now part of the exported API
|
- VIPS_EXEEXT is now part of the exported API
|
||||||
- im_blend() also does sizealike, oops
|
- im_blend() also does sizealike, oops
|
||||||
- jpeg write was not inverting CMYK, thanks Ole
|
- jpeg write was not inverting CMYK, thanks Ole
|
||||||
|
- im_falsecolour() converts to mono 8-bit for you
|
||||||
|
|
||||||
30/11/10 started 7.24.0
|
30/11/10 started 7.24.0
|
||||||
- bump for new stable
|
- bump for new stable
|
||||||
|
10
TODO
10
TODO
@ -1,3 +1,9 @@
|
|||||||
|
- maplut should force to 8/16 bit unsigned? or does it?
|
||||||
|
|
||||||
|
- im_vip2tiff() pyr builder should use new temp system
|
||||||
|
|
||||||
|
- can isanalyze still add spurious messages to the vips error buffer?
|
||||||
|
|
||||||
- icc import / export should cast their inputs, they insist on uchar/ushort at
|
- icc import / export should cast their inputs, they insist on uchar/ushort at
|
||||||
the moment
|
the moment
|
||||||
|
|
||||||
@ -9,7 +15,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
- can we call vips7 funcs from the vips8 interface?
|
- can we call vips7 funcs from the vips8 interface? we already have vips8 from
|
||||||
|
vips7
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- revisit orc conv
|
- revisit orc conv
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
* 29/1/10
|
* 29/1/10
|
||||||
* - cleanups
|
* - cleanups
|
||||||
* - gtkdoc
|
* - gtkdoc
|
||||||
|
* 12/7/11
|
||||||
|
* - force input to mono 8-bit for the user
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -318,7 +320,8 @@ static unsigned char PET_colour[][3] = {
|
|||||||
* @in: input image
|
* @in: input image
|
||||||
* @out: output image
|
* @out: output image
|
||||||
*
|
*
|
||||||
* Turn a 1-band 8-bit image into a 3-band 8-bit image with a false colour
|
* Force @in to 1 band, 8-bit, then transform to
|
||||||
|
* 3-band 8-bit image with a false colour
|
||||||
* map. The map is supposed to make small differences in brightness more
|
* map. The map is supposed to make small differences in brightness more
|
||||||
* obvious.
|
* obvious.
|
||||||
*
|
*
|
||||||
@ -329,15 +332,18 @@ static unsigned char PET_colour[][3] = {
|
|||||||
int
|
int
|
||||||
im_falsecolour( IMAGE *in, IMAGE *out )
|
im_falsecolour( IMAGE *in, IMAGE *out )
|
||||||
{
|
{
|
||||||
|
IMAGE *t[2];
|
||||||
IMAGE *lut;
|
IMAGE *lut;
|
||||||
|
|
||||||
/* Check our args.
|
/* Check our args, force to mono 8-bit.
|
||||||
*/
|
*/
|
||||||
if( im_piocheck( in, out ) ||
|
if( im_piocheck( in, out ) ||
|
||||||
im_check_mono( "im_falsecolour", in ) ||
|
im_check_uncoded( "im_falsecolour", in ) )
|
||||||
im_check_uncoded( "im_falsecolour", in ) ||
|
im_open_local_array( out, t, 2, "im_falsecolour", "p" ) ||
|
||||||
im_check_format( "im_falsecolour", in, IM_BANDFMT_UCHAR ) )
|
im_extract_band( in, t[0], 0 ) ||
|
||||||
|
im_clip2fmt( t[0], t[1], IM_BANDFMT_UCHAR )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
in = t[1];
|
||||||
|
|
||||||
if( !(lut = im_image( (PEL *) PET_colour,
|
if( !(lut = im_image( (PEL *) PET_colour,
|
||||||
1, 256, 3, IM_BANDFMT_UCHAR )) )
|
1, 256, 3, IM_BANDFMT_UCHAR )) )
|
||||||
|
Loading…
Reference in New Issue
Block a user