Warning: session_start(): open(/var/php_session//sess_44246be954e1baef0740614e324b36ad, O_RDWR) failed: Read-only file system (30) in /home/exponent/docs_html/framework/core/subsystems/expSession.php on line 132
img function
Topics

img function

{img} allows you to easily process a graphic file through the phpThumb thumbnail generator.  Available parameters are any allowed by phpThumb

  • 'src',  // source
  • 'new',  // create new image, not thumb of existing
  • 'w', // width
  • 'h',  // height
  • 'wp', // max width for portrait
  • 'hp', // max height for portrait
  • 'wl',  // max with for landscape
  • 'hl',  // max height for landscape
  • 'ws',  // max width for square images
  • 'hs',  // max height for square images
  • 'f',  // output image format (jpeg, gif, png)
  • 'q',  // JPEG compression (1=worst, 95=best, 75=default)
  • 'sx',  // left side of source rectangle (default = 0) (values 0 < sx < 1 represent percentage)
  • 'sy',  // top side of source rectangle (default = 0) (values 0 < sy < 1 represent percentage)
  • 'sw',  // width of source rectangle (default = fullwidth) (values 0 < sw < 1 represent percentage)
  • 'sh',  // height of source rectangle (default = fullheight) (values 0 < sh < 1 represent percentage)
  • 'zc',  /* zoom-crop. Will auto-crop off the larger dimension
            so that the image will fill the smaller dimension
            (requires both "w" and "h", overrides "iar", "far")
            Set to "1" or "C" to zoom-crop towards the center,
            or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR"
            to gravitate towards top/left/bottom/right directions
            (requies ImageMagick for values other than "C" or "1")    */
  • 'bc',  // border hex color (default = 000000)
  • 'bg',  // background hex color (default = FFFFFF)
  • 'bgt',  //
  • 'fltr', /*filter system. See documentation 
  • 'xto',  // EXIF Thumbnail Only - set to only extract EXIF thumbnail and not do any additional processing
  • 'ra',  // Rotate by Angle: angle of rotation in degrees positive = counterclockwise, negative = clockwise
  • 'ar',  /* Auto Rotate: set to "x" to use EXIF orientation
           stored by camera. Can also be set to "l" or "L"
           for landscape, or "p" or "P" for portrait. "l"
           and "P" rotate the image clockwise, "L" and "p"
           rotate the image counter-clockwise.   */
  • 'aoe',  /* Output Allow Enlarging - override the setting for
           $CONFIG['output_allow_enlarging'] (1=on, 0=off)
           ("far" and "iar" both override this and allow output
            larger than input)   */
  • 'far',  /* Force Aspect Ratio - image will be created at size
           specified by "w" and "h" (which must both be set).
           Alignment: L=left,R=right,T=top,B=bottom,C=center
           BL,BR,TL,TR use the appropriate direction if the
           image is landscape or portrait.   */
  • 'iar',  /* Ignore Aspect Ratio - disable proportional resizing
           and stretch image to fit "h" & "w" (which must both
           be set).  (1=on, 0=off)  (overrides "far")   */
  • 'maxb', /* MAXimum Byte size - output quality is auto-set to
           fit thumbnail into "maxb" bytes  (compression
           quality is adjusted for JPEG, bit depth is adjusted
           for PNG and GIF)   */
  • 'down', /* filename to save image to. If this is set the
           browser will prompt to save to this filename rather
           than display the image   */
  • 'phpThumbDebug', // 
  • 'hash', //  depracated I think...
  • 'md5s', /*  MD5 hash of the source image -- if this parameter is
           passed with the hash of the source image then the
           source image is not checked for existance or
           modification and the cached file is used (if
           available). If 'md5s' is passed an empty string then
           phpThumb.php dies and outputs the correct MD5 hash
           value.  This parameter is the single-file equivalent
           of 'cache_source_filemtime_ignore_*' configuration
           paramters   */
  • 'sfn',  /* Source Frame Number - use this frame/page number for
           multi-frame/multi-page source images (GIF, TIFF, etc)   */
  • 'dpi',  // Dots Per Inch - input DPI setting when importing from vector image format such as PDF, WMF, etc
  • 'sia',  /* Save Image As - default filename to save generated
            image as. Specify the base filename, the extension
            (eg: ".png") will be automatically added    */
  • 'nocache'//  ?
Loading Help

Warning: Unknown: open(/var/php_session//sess_44246be954e1baef0740614e324b36ad, O_RDWR) failed: Read-only file system (30) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_session/) in Unknown on line 0