manpagez: man pages & more
man im_scaleps(3)
Home | html | info | man
CONVERSIONS(3)                                                  CONVERSIONS(3)




NAME

       im_scale, im_scaleps - scale an image to unsigned char image


SYNOPSIS

       #include <vips/vips.h>

       int im_scale(in, out)
       IMAGE *in, *out;

       int im_scaleps(in, out)
       IMAGE *in, *out;


DESCRIPTION

       These  functions  scale  a  non-complex  image  to  a  displayable byte
       (unsigned char) image.

       im_scale() scales  the  image  held  by  image  descriptor  to  a  byte
       (unsigned  char)  image  and  writes the result on the image descriptor
       out.  Sizes and the number of the bands of out are identical  to  those
       of input.  Input image should be non complex and can have any number of
       channels.  The output is scaled between 0 and  255;  if  the  image  is
       multiband the maximum value of all channels is set to 255 and the mini-
       mum to 0.  In all cases, rounding is performed  by  adding  .5  to  the
       scaled values.

       im_scaleps()  scales to 0 - 255 by mapping each pixel through the equa-
       tion

          log10(1.0 + pow(x, 0.25))

       and then multiplying by a factor so that the image maximum is 255.

       This transformation highlights both low and high spatial frequencies in
       the power spectrum.  The images produced by this non-linear transforma-
       tion are only for display and not for further processing.


RETURN VALUE

       Each function returns 0 on success and -1 on error.


SEE ALSO

       im_any2c(3), im_c2amph(3), im_clip(3)



                                 28 June 1990                   CONVERSIONS(3)

im_scale 7.14.5 - Generated Mon Sep 8 20:18:16 CDT 2008
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.