From e77cc6a428713b8d3487d12ee69bef3a0413e778 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 27 Mar 2010 09:41:52 +0000 Subject: [PATCH] doc hacking --- TODO | 8 ------ doc/reference/libvips-docs.sgml.in | 2 +- libvips/histograms_lut/hist_dispatch.c | 13 +++++---- libvips/histograms_lut/im_hist.c | 2 +- libvips/histograms_lut/im_histgr.c | 2 +- libvips/histograms_lut/im_histplot.c | 2 +- libvips/include/vips/histograms_lut.h | 38 +++++++++++++++----------- libvips/include/vips/image.h | 4 +-- 8 files changed, 36 insertions(+), 35 deletions(-) diff --git a/TODO b/TODO index 2f178fd8..2ef3eeae 100644 --- a/TODO +++ b/TODO @@ -8,8 +8,6 @@ - added im_local_imask(), im_local_dmask(), needs docs? - some of image.h seems to be missing param names - is local_imask() in the best place? shouldn't it be in mask.h? - im_rotate_imask90 only works for square, odd-sized masks, argh @@ -17,12 +15,6 @@ - lots of stupid little files in hist, eg. im_hsp.c ... paste them into larger modules -- check the order of decls in hist.h, is it sensible? - - check the order in freq_flt as well - - - diff --git a/doc/reference/libvips-docs.sgml.in b/doc/reference/libvips-docs.sgml.in index 21cea6af..9c4d7b4e 100644 --- a/doc/reference/libvips-docs.sgml.in +++ b/doc/reference/libvips-docs.sgml.in @@ -41,13 +41,13 @@ + VIPS operation API by section (no gtkdoc comments yet) - diff --git a/libvips/histograms_lut/hist_dispatch.c b/libvips/histograms_lut/hist_dispatch.c index 8dfc0c59..c76d13bf 100644 --- a/libvips/histograms_lut/hist_dispatch.c +++ b/libvips/histograms_lut/hist_dispatch.c @@ -55,12 +55,15 @@ * tagged with a #VipsType of IM_TYPE_HISTOGRAM and usually displayed by * user-interfaces such as nip2 as plots rather than images. * - * You can make a LUT by scanning an image (see im_histgr()), from a - * matrix (see im_buildlut()), or using arithmetic operators on an identity - * LUT (see im_identity()). + * These functions can be broadly grouped as things to find or build + * histograms (im_histgr(), im_buildlut(), in_identity()), operations that + * manipulate histograms in some way (im_histcum(), im_histnorm()), operations + * to apply histograms (im_maplut()), and a variety of utility + * operations. * - * Once you have a LUT you can manipulate it in various ways (see im_historm() - * and friends) and use it to transform other images (see im_maplut()). + * A final group of operations build tone curves. These are useful in + * pre-press work for adjusting the appearance of images. They are designed + * for CIELAB images, but might be useful elsewhere. */ /* One image in, one out. diff --git a/libvips/histograms_lut/im_hist.c b/libvips/histograms_lut/im_hist.c index b2884030..f8446ca9 100644 --- a/libvips/histograms_lut/im_hist.c +++ b/libvips/histograms_lut/im_hist.c @@ -54,7 +54,7 @@ * im_hist: * @in: input image * @out: output image - * @bandno: band to equalise + * @bandno: band to plot * * Find and plot the histogram of @in. If @bandno is -1, plot all bands. * Otherwise plot the specified band. diff --git a/libvips/histograms_lut/im_histgr.c b/libvips/histograms_lut/im_histgr.c index 0e61d7d7..c2763218 100644 --- a/libvips/histograms_lut/im_histgr.c +++ b/libvips/histograms_lut/im_histgr.c @@ -295,7 +295,7 @@ find_ushort_hist_extract( REGION *reg, void *seq, void *a, void *b ) * * @in must be u8 or u16. @out is always u32. * - * See also: im_histindexed(), im_histeq(). + * See also: im_hist_indexed(), im_histeq(). * * Returns: 0 on success, -1 on error */ diff --git a/libvips/histograms_lut/im_histplot.c b/libvips/histograms_lut/im_histplot.c index cb9c108c..07089600 100644 --- a/libvips/histograms_lut/im_histplot.c +++ b/libvips/histograms_lut/im_histplot.c @@ -305,7 +305,7 @@ plot( IMAGE *in, IMAGE *out ) * float types min moved to 0, max moved to any * (square output) * - * See also: im_histindexed(), im_histeq(). + * See also: im_hist_indexed(), im_histeq(). * * Returns: 0 on success, -1 on error */ diff --git a/libvips/include/vips/histograms_lut.h b/libvips/include/vips/histograms_lut.h index 9ca8b8e8..8577747c 100644 --- a/libvips/include/vips/histograms_lut.h +++ b/libvips/include/vips/histograms_lut.h @@ -37,26 +37,36 @@ extern "C" { #endif /*__cplusplus*/ -int im_maplut( IMAGE *in, IMAGE *out, IMAGE *lut ); -int im_gammacorrect( IMAGE *in, IMAGE *out, double exponent ); -int im_heq( IMAGE *in, IMAGE *out, int bandno ); -int im_hist( IMAGE *in, IMAGE *out, int bandno ); -int im_hist_indexed( IMAGE *index, IMAGE *value, IMAGE *out ); -int im_histeq( IMAGE *in, IMAGE *out ); -int im_histnorm( IMAGE *in, IMAGE *out ); -int im_histcum( IMAGE *in, IMAGE *out ); int im_histgr( IMAGE *in, IMAGE *out, int bandno ); int im_histnD( IMAGE *in, IMAGE *out, int bins ); -int im_histplot( IMAGE *hist, IMAGE *histplot ); -int im_histspec( IMAGE *hin, IMAGE *href, IMAGE *lut ); -int im_hsp( IMAGE *in, IMAGE *ref, IMAGE *out ); +int im_hist_indexed( IMAGE *index, IMAGE *value, IMAGE *out ); + int im_identity( IMAGE *lut, int bands ); int im_identity_ushort( IMAGE *lut, int bands, int sz ); -int im_lhisteq( IMAGE *in, IMAGE *out, int xwin, int ywin ); int im_invertlut( DOUBLEMASK *input, IMAGE *output, int lut_size ); int im_buildlut( DOUBLEMASK *input, IMAGE *output ); +int im_project( IMAGE *in, IMAGE *hout, IMAGE *vout ); + +int im_histnorm( IMAGE *in, IMAGE *out ); +int im_histcum( IMAGE *in, IMAGE *out ); +int im_histeq( IMAGE *in, IMAGE *out ); +int im_histspec( IMAGE *hin, IMAGE *href, IMAGE *lut ); +int im_ismonotonic( IMAGE *lut, int *out ); +int im_histplot( IMAGE *hist, IMAGE *histplot ); + +int im_maplut( IMAGE *in, IMAGE *out, IMAGE *lut ); + +int im_hist( IMAGE *in, IMAGE *out, int bandno ); +int im_hsp( IMAGE *in, IMAGE *ref, IMAGE *out ); +int im_gammacorrect( IMAGE *in, IMAGE *out, double exponent ); +int im_mpercent( IMAGE *in, double percent, int *out ); +int im_mpercent_hist( IMAGE *hist, double percent, int *out ); + +int im_heq( IMAGE *in, IMAGE *out, int bandno ); +int im_lhisteq( IMAGE *in, IMAGE *out, int xwin, int ywin ); int im_stdif( IMAGE *in, IMAGE *out, double a, double m0, double b, double s0, int xwin, int ywin ); + int im_tone_build_range( IMAGE *out, int in_max, int out_max, double Lb, double Lw, double Ps, double Pm, double Ph, @@ -66,11 +76,7 @@ int im_tone_build( IMAGE *out, double S, double M, double H ); int im_tone_analyse( IMAGE *in, IMAGE *lut, double Ps, double Pm, double Ph, double S, double M, double H ); -int im_ismonotonic( IMAGE *lut, int *out ); int im_tone_map( IMAGE *in, IMAGE *out, IMAGE *lut ); -int im_project( IMAGE *in, IMAGE *hout, IMAGE *vout ); -int im_mpercent( IMAGE *in, double percent, int *out ); -int im_mpercent_hist( IMAGE *hist, double percent, int *out ); #ifdef __cplusplus } diff --git a/libvips/include/vips/image.h b/libvips/include/vips/image.h index d5a3399b..bf246493 100644 --- a/libvips/include/vips/image.h +++ b/libvips/include/vips/image.h @@ -297,8 +297,8 @@ GOptionGroup *im_get_option_group( void ); const char *im_version_string( void ); int im_version( int flag ); -const char *im_guess_prefix( const char *, const char * ); -const char *im_guess_libdir( const char *, const char * ); +const char *im_guess_prefix( const char *argv0, const char *env_name ); +const char *im_guess_libdir( const char *argv0, const char *env_name ); VipsImage *im_open( const char *filename, const char *mode );