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


PHP Pel::tra方法代码示例

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


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

示例1: __toString

 /**
  * Make a string representation of this JPEG object.
  *
  * This is mainly usefull for debugging.  It will show the structure
  * of the image, and its sections.
  *
  * @return string debugging information about this JPEG object.
  */
 function __toString()
 {
     $str = Pel::tra("Dumping JPEG data...\n");
     for ($i = 0; $i < count($this->sections); $i++) {
         $m = $this->sections[$i][0];
         $c = $this->sections[$i][1];
         $str .= Pel::fmt("Section %d (marker 0x%02X - %s):\n", $i, $m, PelJpegMarker::getName($m));
         $str .= Pel::fmt("  Description: %s\n", PelJpegMarker::getDescription($m));
         if ($m == PelJpegMarker::SOI || $m == PelJpegMarker::EOI) {
             continue;
         }
         if ($c instanceof PelExif) {
             $str .= Pel::tra("  Content    : Exif data\n");
             $str .= $c->__toString() . "\n";
         } elseif ($c instanceof PelJpegComment) {
             $str .= Pel::fmt("  Content    : %s\n", $c->getValue());
         } else {
             $str .= Pel::tra("  Content    : Unknown\n");
         }
     }
     return $str;
 }
开发者ID:sansandeep143,项目名称:av,代码行数:30,代码来源:PelJpeg.php

示例2: __toString

 /**
  * Return a string representation of this object.
  *
  * @return string a string describing this object. This is mostly
  *         useful for debugging.
  */
 public function __toString()
 {
     return Pel::tra("Dumping Exif data...\n") . $this->tiff->__toString();
 }
开发者ID:jmstan,项目名称:craft-website,代码行数:10,代码来源:PelExif.php

示例3: getTitle

 /**
  * Returns a title for an Exif tag.
  *
  * @param
  *            int the IFD type of the tag, one of {@link PelIfd::IFD0},
  *            {@link PelIfd::IFD1}, {@link PelIfd::EXIF}, {@link PelIfd::GPS},
  *            or {@link PelIfd::INTEROPERABILITY}.
  *
  * @param
  *            PelTag the tag.
  *
  * @return string the title of the tag, e.g., 'Image Width' for the
  *         {@link IMAGE_WIDTH} tag. If the tag isn't known, the string
  *         'Unknown Tag: 0xTT' will be returned where 'TT' is the
  *         hexadecimal representation of the tag.
  */
 public function getTitle($type, $tag)
 {
     switch ($type) {
         case PelIfd::IFD0:
         case PelIfd::IFD1:
         case PelIfd::EXIF:
         case PelIfd::INTEROPERABILITY:
             switch ($tag) {
                 case self::INTEROPERABILITY_INDEX:
                     return Pel::tra('Interoperability Index');
                 case self::INTEROPERABILITY_VERSION:
                     return Pel::tra('Interoperability Version');
                 case self::IMAGE_WIDTH:
                     return Pel::tra('Image Width');
                 case self::IMAGE_LENGTH:
                     return Pel::tra('Image Length');
                 case self::BITS_PER_SAMPLE:
                     return Pel::tra('Bits per Sample');
                 case self::COMPRESSION:
                     return Pel::tra('Compression');
                 case self::PHOTOMETRIC_INTERPRETATION:
                     return Pel::tra('Photometric Interpretation');
                 case self::FILL_ORDER:
                     return Pel::tra('Fill Order');
                 case self::DOCUMENT_NAME:
                     return Pel::tra('Document Name');
                 case self::IMAGE_DESCRIPTION:
                     return Pel::tra('Image Description');
                 case self::MAKE:
                     return Pel::tra('Manufacturer');
                 case self::MODEL:
                     return Pel::tra('Model');
                 case self::STRIP_OFFSETS:
                     return Pel::tra('Strip Offsets');
                 case self::ORIENTATION:
                     return Pel::tra('Orientation');
                 case self::SAMPLES_PER_PIXEL:
                     return Pel::tra('Samples per Pixel');
                 case self::ROWS_PER_STRIP:
                     return Pel::tra('Rows per Strip');
                 case self::STRIP_BYTE_COUNTS:
                     return Pel::tra('Strip Byte Count');
                 case self::X_RESOLUTION:
                     return Pel::tra('x-Resolution');
                 case self::Y_RESOLUTION:
                     return Pel::tra('y-Resolution');
                 case self::PLANAR_CONFIGURATION:
                     return Pel::tra('Planar Configuration');
                 case self::RESOLUTION_UNIT:
                     return Pel::tra('Resolution Unit');
                 case self::TRANSFER_FUNCTION:
                     return Pel::tra('Transfer Function');
                 case self::SOFTWARE:
                     return Pel::tra('Software');
                 case self::DATE_TIME:
                     return Pel::tra('Date and Time');
                 case self::ARTIST:
                     return Pel::tra('Artist');
                 case self::WHITE_POINT:
                     return Pel::tra('White Point');
                 case self::PRIMARY_CHROMATICITIES:
                     return Pel::tra('Primary Chromaticities');
                 case self::TRANSFER_RANGE:
                     return Pel::tra('Transfer Range');
                 case self::JPEG_PROC:
                     return Pel::tra('JPEG Process');
                 case self::JPEG_INTERCHANGE_FORMAT:
                     return Pel::tra('JPEG Interchange Format');
                 case self::JPEG_INTERCHANGE_FORMAT_LENGTH:
                     return Pel::tra('JPEG Interchange Format Length');
                 case self::YCBCR_COEFFICIENTS:
                     return Pel::tra('YCbCr Coefficients');
                 case self::YCBCR_SUB_SAMPLING:
                     return Pel::tra('YCbCr Sub-Sampling');
                 case self::YCBCR_POSITIONING:
                     return Pel::tra('YCbCr Positioning');
                 case self::REFERENCE_BLACK_WHITE:
                     return Pel::tra('Reference Black/White');
                 case self::RELATED_IMAGE_FILE_FORMAT:
                     return Pel::tra('Related Image File Format');
                 case self::RELATED_IMAGE_WIDTH:
                     return Pel::tra('Related Image Width');
                 case self::RELATED_IMAGE_LENGTH:
                     return Pel::tra('Related Image Length');
//.........这里部分代码省略.........
开发者ID:nao-pon,项目名称:HypCommon,代码行数:101,代码来源:PelTag.php

示例4: getText

 /**
  * Get the value of an entry as text.
  *
  * The value will be returned in a format suitable for presentation,
  * e.g., instead of returning '2' for a {@link
  * PelTag::METERING_MODE} tag, 'Center-Weighted Average' is
  * returned.
  *
  * @param boolean some values can be returned in a long or more
  * brief form, and this parameter controls that.
  *
  * @return string the value as text.
  */
 function getText($brief = false)
 {
     switch ($this->tag) {
         case PelTag::METERING_MODE:
             //CC (e->components, 1, v);
             switch ($this->value[0]) {
                 case 0:
                     return Pel::tra('Unknown');
                 case 1:
                     return Pel::tra('Average');
                 case 2:
                     return Pel::tra('Center-Weighted Average');
                 case 3:
                     return Pel::tra('Spot');
                 case 4:
                     return Pel::tra('Multi Spot');
                 case 5:
                     return Pel::tra('Pattern');
                 case 6:
                     return Pel::tra('Partial');
                 case 255:
                     return Pel::tra('Other');
                 default:
                     return $this->value[0];
             }
         case PelTag::COMPRESSION:
             //CC (e->components, 1, v);
             switch ($this->value[0]) {
                 case 1:
                     return Pel::tra('Uncompressed');
                 case 6:
                     return Pel::tra('JPEG compression');
                 default:
                     return $this->value[0];
             }
         case PelTag::PLANAR_CONFIGURATION:
             //CC (e->components, 1, v);
             switch ($this->value[0]) {
                 case 1:
                     return Pel::tra('chunky format');
                 case 2:
                     return Pel::tra('planar format');
                 default:
                     return $this->value[0];
             }
         case PelTag::SENSING_METHOD:
             //CC (e->components, 1, v);
             switch ($this->value[0]) {
                 case 1:
                     return Pel::tra('Not defined');
                 case 2:
                     return Pel::tra('One-chip color area sensor');
                 case 3:
                     return Pel::tra('Two-chip color area sensor');
                 case 4:
                     return Pel::tra('Three-chip color area sensor');
                 case 5:
                     return Pel::tra('Color sequential area sensor');
                 case 7:
                     return Pel::tra('Trilinear sensor');
                 case 8:
                     return Pel::tra('Color sequential linear sensor');
                 default:
                     return $this->value[0];
             }
         case PelTag::LIGHT_SOURCE:
             //CC (e->components, 1, v);
             switch ($this->value[0]) {
                 case 0:
                     return Pel::tra('Unknown');
                 case 1:
                     return Pel::tra('Daylight');
                 case 2:
                     return Pel::tra('Fluorescent');
                 case 3:
                     return Pel::tra('Tungsten (incandescent light)');
                 case 4:
                     return Pel::tra('Flash');
                 case 9:
                     return Pel::tra('Fine weather');
                 case 10:
                     return Pel::tra('Cloudy weather');
                 case 11:
                     return Pel::tra('Shade');
                 case 12:
                     return Pel::tra('Daylight fluorescent');
                 case 13:
//.........这里部分代码省略.........
开发者ID:sansandeep143,项目名称:av,代码行数:101,代码来源:PelEntryShort.php

示例5: getText

 /**
  * Return a text string with the copyright information.
  *
  * The photographer and editor copyright fields will be returned
  * with a '-' in between if both copyright fields are present,
  * otherwise only one of them will be returned.
  *
  * @param boolean if false, then the strings '(Photographer)' and
  * '(Editor)' will be appended to the photographer and editor
  * copyright fields (if present), otherwise the fields will be
  * returned as is.
  *
  * @return string the copyright information in a string.
  */
 function getText($brief = false)
 {
     if ($brief) {
         $p = '';
         $e = '';
     } else {
         $p = ' ' . Pel::tra('(Photographer)');
         $e = ' ' . Pel::tra('(Editor)');
     }
     if ($this->photographer != '' && $this->editor != '') {
         return $this->photographer . $p . ' - ' . $this->editor . $e;
     }
     if ($this->photographer != '') {
         return $this->photographer . $p;
     }
     if ($this->editor != '') {
         return $this->editor . $e;
     }
     return '';
 }
开发者ID:pawelzielak,项目名称:opencaching-pl,代码行数:34,代码来源:PelEntryAscii.php

示例6: getDescription

 /**
  * Returns a description of a JPEG marker.
  *
  * @param PelJpegMarker the marker.
  *
  * @return string the description of the marker.
  */
 static function getDescription($m)
 {
     switch ($m) {
         case self::SOF0:
             return Pel::tra('Encoding (baseline)');
         case self::SOF1:
             return Pel::tra('Encoding (extended sequential)');
         case self::SOF2:
             return Pel::tra('Encoding (progressive)');
         case self::SOF3:
             return Pel::tra('Encoding (lossless)');
         case self::SOF5:
             return Pel::tra('Encoding (differential sequential)');
         case self::SOF6:
             return Pel::tra('Encoding (differential progressive)');
         case self::SOF7:
             return Pel::tra('Encoding (differential lossless)');
         case self::SOF9:
             return Pel::tra('Encoding (extended sequential, arithmetic)');
         case self::SOF10:
             return Pel::tra('Encoding (progressive, arithmetic)');
         case self::SOF11:
             return Pel::tra('Encoding (lossless, arithmetic)');
         case self::SOF13:
             return Pel::tra('Encoding (differential sequential, arithmetic)');
         case self::SOF14:
             return Pel::tra('Encoding (differential progressive, arithmetic)');
         case self::SOF15:
             return Pel::tra('Encoding (differential lossless, arithmetic)');
         case self::SOI:
             return Pel::tra('Start of image');
         case self::EOI:
             return Pel::tra('End of image');
         case self::SOS:
             return Pel::tra('Start of scan');
         case self::COM:
             return Pel::tra('Comment');
         case self::DHT:
             return Pel::tra('Define Huffman table');
         case self::JPG:
             return Pel::tra('Extension');
         case self::DAC:
             return Pel::tra('Define arithmetic coding conditioning');
         case self::RST0:
             return Pel::fmt('Restart %d', 0);
         case self::RST1:
             return Pel::fmt('Restart %d', 1);
         case self::RST2:
             return Pel::fmt('Restart %d', 2);
         case self::RST3:
             return Pel::fmt('Restart %d', 3);
         case self::RST4:
             return Pel::fmt('Restart %d', 4);
         case self::RST5:
             return Pel::fmt('Restart %d', 5);
         case self::RST6:
             return Pel::fmt('Restart %d', 6);
         case self::RST7:
             return Pel::fmt('Restart %d', 7);
         case self::DQT:
             return Pel::tra('Define quantization table');
         case self::DNL:
             return Pel::tra('Define number of lines');
         case self::DRI:
             return Pel::tra('Define restart interval');
         case self::DHP:
             return Pel::tra('Define hierarchical progression');
         case self::EXP:
             return Pel::tra('Expand reference component');
         case self::APP0:
             return Pel::fmt('Application segment %d', 0);
         case self::APP1:
             return Pel::fmt('Application segment %d', 1);
         case self::APP2:
             return Pel::fmt('Application segment %d', 2);
         case self::APP3:
             return Pel::fmt('Application segment %d', 3);
         case self::APP4:
             return Pel::fmt('Application segment %d', 4);
         case self::APP5:
             return Pel::fmt('Application segment %d', 5);
         case self::APP6:
             return Pel::fmt('Application segment %d', 6);
         case self::APP7:
             return Pel::fmt('Application segment %d', 7);
         case self::APP8:
             return Pel::fmt('Application segment %d', 8);
         case self::APP9:
             return Pel::fmt('Application segment %d', 9);
         case self::APP10:
             return Pel::fmt('Application segment %d', 10);
         case self::APP11:
             return Pel::fmt('Application segment %d', 11);
//.........这里部分代码省略.........
开发者ID:pawelzielak,项目名称:opencaching-pl,代码行数:101,代码来源:PelJpegMarker.php


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