>  Docs Center  >  Libraries  >  Coyote  >  CGRESIZEIMAGE

CGRESIZEIMAGE

CGRESIZEIMAGE

Description


  Provides a CONGRID like resizing of images, although it performs this service
  correctly for both 2D and 3D images. Pixel locations do not change in the output
  image, since the center of the pixel is used for interpolation purposes, rather than
  the lower-left corner of the pixel. Unlike CONGRID, 3D images can use nearest neighbor
  interpolation as well as bilinear interpolation.

Categories


    Utilities
   

Params


    image: in, required, type=any
        The image variable to resize. Must be a 2D or 3D image. If a 3D image,
        one of the image dimensions must be a 3.
       
    cols: in, required, type=integer
          The number of columns (i.e., XSIZE) in the output image.
         
    rows: in, required, type=integer
          The number of rows (i.e., YSIZE) in the output image.
               

Keywords


    interpolate: in, optional, type=boolean, default=0
        Is set, bilinear interpolation is used to resize the image. Otherwise,
        nearest neighbor sampling is used instead.
      minus_one: in, optional, type=boolean, default=0
          Identical to CONGRID MINUS_ONE keyword.
         

Examples


    Used in a similar fashion to the Congrid command, but for images::
      IDL> bigEarth = FSC_Resize_Image(cgDemoData(7), 720, 720)
      IDL> bigRose = FSC_Resize_Image(cgDemoData(16), 681, 447)
     

Author


    FANNING SOFTWARE CONSULTING::
      David W. Fanning
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com

History


    Change History::
        Written, 20 November 2010. DWF.
    I have been convinced (conversations with Wayne Landsman) that if the
        CENTER keyword is set, the MINUS_ONE keyword is not needed, since
        it was created to solve the same problem. So, I have changed the
        default setting of MINUS_ONE to 0. 11 Jan 2011. DWF.
    Eenamed cgResizeImage from FSC_Resize_Image. 20 Oct 2012. DWF.
       

Copyright


    Copyright (c) 2010, Fanning Software Consulting, Inc.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us