resize                package:EBImage                R Documentation

_S_p_a_t_i_a_l _l_i_n_e_a_r _t_r_a_n_s_f_o_r_m_a_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Rotates, mirrors and resizes images.

_U_s_a_g_e:

       flip(x)
       flop(x)
       resize(x, w, h, blur=1, filter="Lanczos")
       rotate(x, angle=90)

_A_r_g_u_m_e_n_t_s:

       x: An 'Image' object or an array.

    w, h: Width and height of a new image. One of these arguments can
          be missing to enable proportional resizing. 

    blur: The blur factor, where 1 ('TRUE') is blurry, 0 ('FALSE') is
          sharp.

  filter: Interpolating sampling filter.

   angle: Image rotation angle in degrees.

_D_e_t_a_i_l_s:

     'flip' transforms 'x' in its vertical mirror image by reflecting
     the pixels around the central x-axis.

     'flop' transforms 'x' in its horizontal mirror image by reflecting
     the pixels around the central y-axis.

     'resize' scales the image to the desired dimensions using the
     supplied interpolating filter. Available filters are: 'Point',
     'Box', 'Triangle', 'Hermite', 'Hanning', 'Hamming', 'Blackman',
     'Gaussian', 'Quadratic', 'Cubic', 'Catrom', 'Mitchell', 'Lanczos',
     'Bessel' and 'Sinc'. The filter 'Box' performs a nearest-neighbor
     interpolation and is fast but introduces considerable aliasing.
     The filter 'Triangle' performs a bilinear interpolation and is a
     good trade-off between speed adn aliasing. Cubic interpolation
     with the filter 'Cubic' is also a good trade-off. High-quality and
     slower interpolation is achieved with the 'Lanczos' filter. The
     algorithm used by this ImageMagick function is not well defined.

     'rotate' rotates the image counter-clockwise with the specified
     angle. Rotated images are usually larger than the originals and
     have empty triangular corners filled in black. The algorithm used
     by this ImageMagick function is not well defined.

_V_a_l_u_e:

     An 'Image' object or an array, containing the transformed version
     of 'x'.

_A_u_t_h_o_r(_s):

     Oleg Sklyar, osklyar@ebi.ac.uk, 2006-2007

_R_e_f_e_r_e_n_c_e_s:

     _ImageMagick_: <URL: http://www.imagemagick.org>.

_S_e_e _A_l_s_o:

     'translate'

_E_x_a_m_p_l_e_s:

        x = readImage(system.file("images", "lena.gif", package="EBImage"))
        if (interactive()) display(x)

        y = flip(x)
        if (interactive()) display(y, title='flip(x)')

        y = flop(x) 
        if (interactive()) display(y, title='flop(x)')

        y = resize(x, 128) 
        if (interactive()) display(y, title='resize(x, 128)')

        y = rotate(x, 30) 
        if (interactive()) display(y, title='rotate(x, 30)')

