• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getImageMetaData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getImageMetaData函数的典型用法代码示例。如果您正苦于以下问题:PHP getImageMetaData函数的具体用法?PHP getImageMetaData怎么用?PHP getImageMetaData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: printTags

}
?>
				<?php 
if (getTags() || zp_loggedin()) {
    ?>
<div class="sidebar-section"><?php 
    printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', '');
    ?>
</div><?php 
}
?>
				<?php 
if (!$zpmin_disablemeta) {
    ?>
					<?php 
    if (getImageMetaData() || zp_loggedin()) {
        ?>
<div class="sidebar-section"><?php 
        printImageMetadata('', false, null, 'full-image-meta', true);
        ?>
</div><?php 
    }
    ?>
				<?php 
}
?>
				<?php 
if (function_exists('printSlideShowLink')) {
    ?>
<div class="sidebar-section"><div class="slideshow-link"><?php 
    printSlideShowLink(gettext('View Slideshow'));
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:image.php


示例2: printImageMetadata

/**
 * Prints the Metadata data of the current image
 *
 * @param string $title title tag for the class
 * @param bool $toggle set to true to get a javascript toggle on the display of the data
 * @param string $id style class id
 * @param string $class style class
 * @author Ozh
 */
function printImageMetadata($title = NULL, $toggle = true, $id = 'imagemetadata', $class = null, $span = NULL)
{
    global $_zp_exifvars, $_zp_current_image;
    if (false === ($exif = getImageMetaData($_zp_current_image, true))) {
        return;
    }
    if (is_null($title)) {
        $title = gettext('Image Info');
    }
    if ($class) {
        $class = ' class="' . $class . '"';
    }
    if (!$span) {
        $span = 'exif_link';
    }
    $dataid = $id . '_data';
    if ($id) {
        $id = ' id="' . $id . '"';
    }
    $refh = $refa = $style = '';
    if ($toggle == 'colorbox' && zp_has_filter('theme_head', 'colorbox::css')) {
        $refh = '<a href="#" class="colorbox" title="' . $title . '">';
        $refa = '</a>';
        $style = ' style="display:none"';
    } else {
        if ($toggle) {
            $refh = '<a href="javascript:toggle(\'' . $dataid . '\');" title="' . $title . '">';
            $refa = '</a>';
            $style = ' style="display:none"';
        }
    }
    ?>
	<span id="<?php 
    echo $span;
    ?>
" class="metadata_title">
		<?php 
    echo $refh;
    echo $title;
    echo $refa;
    ?>
	</span>
	<div id="<?php 
    echo $dataid;
    ?>
"<?php 
    echo $style;
    ?>
>
		<div<?php 
    echo $id . $class;
    ?>
>
			<table>
				<?php 
    foreach ($exif as $field => $value) {
        $label = $_zp_exifvars[$field][2];
        echo "<tr><td class=\"label\">{$label}:</td><td class=\"value\">";
        switch ($_zp_exifvars[$field][6]) {
            case 'time':
                echo zpFormattedDate(DATE_FORMAT, strtotime($value));
                break;
            default:
                echo html_encode($value);
                break;
        }
        echo "</td></tr>\n";
    }
    ?>
			</table>
		</div>
	</div>
	<?php 
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:83,代码来源:template-functions.php


示例3: printTags

?>
</div>
		<?php 
printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', ', ');
?>
		<br style="clear:both;" /><br />
		<?php 
if (function_exists('printSlideShowLink')) {
    echo '<span id="slideshowlink">';
    printSlideShowLink(gettext('View Slideshow'));
    echo '</span>';
}
?>

		<?php 
if (getImageMetaData()) {
    echo "<div id=\"exif_link\"><a href=\"#\" title=\"" . gettext("Image Info") . "\" class=\"colorbox\">" . gettext("Image Info") . "</a></div>";
    echo "<div style='display:none'>";
    printImageMetadata('', false);
    echo "</div>";
}
?>

		<br style="clear:both" />
		<?php 
if (function_exists('printRating')) {
    printRating();
}
?>
		<?php 
if (function_exists('printGoogleMap')) {
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:image.php


示例4: printImageTitle

			<div class="row photo-description">
				<div class="span3 offset2">
					<h4>
						<?php 
if (getOption('zpB_show_exif') && getImageMetaData()) {
    ?>
							<a href="#exif_data" data-toggle="modal"><i class="icon-info-sign"></i></a>
						<?php 
}
?>
						<?php 
printImageTitle(true);
?>
					</h4>
					<?php 
if (getOption('zpB_show_exif') && getImageMetaData()) {
    ?>
					<div id="exif_data" class="modal hide"><?php 
    printImageMetadata('', false);
    ?>
</div>
					<script type="text/javascript">
						jQuery(document).ready(function($) {
							$('#exif_data').modal({
								show: false
							});
						});
					</script>
					<?php 
}
?>
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:31,代码来源:image.php


示例5: zpardoise_printEXIF

function zpardoise_printEXIF()
{
    $Meta_data = getImageMetaData();
    // put all exif data in a array
    if (!is_null($Meta_data)) {
        $Exifs_list = '';
        if (isset($Meta_data['EXIFModel'])) {
            $Exifs_list .= html_encode($Meta_data['EXIFModel']);
        }
        if (isset($Meta_data['EXIFFocalLength'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFFocalLength']);
        }
        if (isset($Meta_data['EXIFFNumber'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFFNumber']);
        }
        if (isset($Meta_data['EXIFExposureTime'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFExposureTime']);
        }
        if (isset($Meta_data['EXIFISOSpeedRatings'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFISOSpeedRatings']) . ' ISO';
        }
        echo $Exifs_list;
    }
}
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:24,代码来源:functions.php


示例6: hasMapData

/**
 * Returns true if the current image has EXIF location data
 *
 * @return bool
 */
function hasMapData()
{
    $exif = getImageMetaData(NULL, false);
    if (!empty($exif['EXIFGPSLatitude']) && !empty($exif['EXIFGPSLongitude'])) {
        return true;
    }
    return false;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:13,代码来源:GoogleMap.php


示例7: getPlayerConfig

    /**
     * Get the JS configuration of VideoJS
     *
     * @param mixed $movie the image object
     * @param string $movietitle the title of the movie
     *
     */
    function getPlayerConfig($movie, $movietitle = NULL)
    {
        global $_zp_current_album;
        $moviepath = $movie->getFullImageURL(FULLWEBPATH);
        $ext = getSuffix($moviepath);
        if (!in_array($ext, array('m4v', 'mp4', 'flv'))) {
            return '<span class="error">' . gettext('This multimedia format is not supported by VideoJS') . '</span>';
        }
        $autoplay = '';
        if (getOption('VideoJS_autoplay')) {
            $autoplay = ' autoplay';
        }
        $videoThumb = '';
        if (getOption('VideoJS_poster')) {
            $videoThumb = $movie->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true);
        }
        $videoRes = getOption('VideoJS_resolution');
        $metadata = getImageMetaData(NULL, false);
        $vidWidth = $metadata['VideoResolution_x'];
        $vidHeight = $metadata['VideoResolution_y'];
        $playerconfig = '
			<div id="player" >
				<video id="MyPlayer" class="video-js vjs-default-skin" controls' . $autoplay . ' preload="auto" width=' . $vidWidth . ' poster="' . $videoThumb . '">
					' . $this->getCounterpartFile($moviepath, "mp4", "HD") . '
					' . $this->getCounterpartFile($moviepath, "mp4", "SD") . '
					' . $this->getCounterpartFile($moviepath, "ogv", "HD") . '
					' . $this->getCounterpartFile($moviepath, "ogv", "SD") . '
					' . $this->getCounterpartFile($moviepath, "webm", "HD") . '
					' . $this->getCounterpartFile($moviepath, "webm", "SD") . '
				</video>
			</div>
			<script type="text/javascript">
				videojs("MyPlayer", {
					plugins: {
						videoJsResolutionSwitcher: {
							default: "' . $videoRes . '",
							dynamicLabel: true
						}
					}
				}, function(){
					var player = this;
					window.player = player
					player.on("play", function(){
						player.poster("")
					})
				})
			</script>';
        return $playerconfig;
    }
开发者ID:JimBrown,项目名称:VideoJS,代码行数:56,代码来源:VideoJS.php


示例8: printImageMetadata

/**
 * Prints the Metadata data of the current image, and make each value editable in place if applicable
 *
 * @param string $title title tag for the class
 * @param bool $toggle set to true to get a javascript toggle on the display of the data
 * @param string $id style class id
 * @param string $class style class
 * @param bool $editable set true to allow editing by the admin
 * @param string $editclass CSS class applied to element when editable
 * @param mixed $messageIfEmpty Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string.
 * @author Ozh
 */
function printImageMetadata($title = NULL, $toggle = true, $id = 'imagemetadata', $class = null, $editable = false, $editclass = '', $messageIfEmpty = '')
{
    global $_zp_exifvars, $_zp_current_image;
    if (false === ($exif = getImageMetaData($_zp_current_image, true))) {
        return;
    }
    if (is_null($title)) {
        $title = gettext('Image Info');
    }
    // Metadata values will be editable only with sufficient privileges
    $editable = $editable && zp_loggedin();
    if ($messageIfEmpty === true) {
        $messageIfEmpty = gettext('(No data)');
    }
    $dataid = $id . '_data';
    echo "<div" . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . ">\n";
    if ($toggle) {
        echo "<a href=\"javascript:toggle('{$dataid}');\">";
    }
    echo "<span class='metadata_title'>{$title}</span>";
    if ($toggle) {
        echo "</a>\n";
    }
    echo "<table id=\"{$dataid}\"" . ($toggle ? " style=\"display: none;\"" : '') . ">\n";
    foreach ($exif as $field => $value) {
        $label = $_zp_exifvars[$field][2];
        echo "<tr><td class=\"label\">{$label}:</td><td class=\"value\">";
        printEditable('image', $field, $editable, $editclass, $messageIfEmpty, false, $value);
        echo "</td></tr>\n";
    }
    echo "</table>\n</div>\n";
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:44,代码来源:template-functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getImageSize函数代码示例发布时间:2022-05-15
下一篇:
PHP getImageInfo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap