当前位置: 首页>>代码示例>>PHP>>正文


PHP Pel::getJPEGQuality方法代码示例

本文整理汇总了PHP中Pel::getJPEGQuality方法的典型用法代码示例。如果您正苦于以下问题:PHP Pel::getJPEGQuality方法的具体用法?PHP Pel::getJPEGQuality怎么用?PHP Pel::getJPEGQuality使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pel的用法示例。


在下文中一共展示了Pel::getJPEGQuality方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Construct a new data window with the data supplied.
  *
  * @param
  *            mixed the data that this window will contain. This can
  *            either be given as a string (interpreted litteraly as a sequence
  *            of bytes) or a PHP image resource handle. The data will be copied
  *            into the new data window.
  *
  * @param
  *            boolean the initial byte order of the window. This must
  *            be either {@link PelConvert::LITTLE_ENDIAN} or {@link
  *            PelConvert::BIG_ENDIAN}. This will be used when integers are
  *            read from the data, and it can be changed later with {@link
  *            setByteOrder()}.
  */
 public function __construct($data = '', $endianess = PelConvert::LITTLE_ENDIAN)
 {
     if (is_string($data)) {
         $this->data = $data;
     } elseif (is_resource($data) && get_resource_type($data) == 'gd') {
         /*
          * The ImageJpeg() function insists on printing the bytes
          * instead of returning them in a more civil way as a string, so
          * we have to buffer the output...
          */
         ob_start();
         ImageJpeg($data, null, Pel::getJPEGQuality());
         $this->data = ob_get_clean();
     } else {
         throw new PelInvalidArgumentException('Bad type for $data: %s', gettype($data));
     }
     $this->order = $endianess;
     $this->size = strlen($this->data);
 }
开发者ID:jmstan,项目名称:craft-website,代码行数:35,代码来源:PelDataWindow.php


注:本文中的Pel::getJPEGQuality方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。