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


PHP image::saveImage方法代码示例

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


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

示例1: image

<?php

include 'image.class.php';
$image = new image(320, 200);
for ($i = 1; $i <= 15; $i++) {
    $image->drawFilledRectangle(10 + 10 * $i, 170 - 10 * $i, 30 + 10 * $i, 190 - 10 * $i, '0000ff50');
}
for ($i = 1; $i <= 15; $i++) {
    $image->drawFilledRectangle(110 + 10 * $i, 170 - 10 * $i, 130 + 10 * $i, 190 - 10 * $i, '0000ff50');
}
for ($i = 1; $i <= 15; $i++) {
    $image->drawFilledRectangle(10 + 10 * $i, 10 + 10 * $i, 30 + 10 * $i, 30 + 10 * $i, 'ff000050');
}
for ($i = 1; $i <= 15; $i++) {
    $image->drawFilledRectangle(110 + 10 * $i, 10 + 10 * $i, 130 + 10 * $i, 30 + 10 * $i, 'ff000050');
}
$image->saveImage('demo.png');
echo "<img hspace='0' vspace='0' src='demo.png' border='0'>";
开发者ID:kumarsivarajan,项目名称:ctrl-dock,代码行数:18,代码来源:demo.image.class.php

示例2: uploader

    $uploader = new uploader();
    $uploader->checkAndMove();
}
if (!empty($_SESSION['filename'])) {
    $image = new image();
    $image->getDimensions();
    if (!empty($_POST['imageCrop'])) {
        $image->cropImage();
    }
}
?>
</head>
<body>
<center>
<h1>Загрузка и обработка изображения</h1>
<?php 
$menu->showUploadMenu();
if (!empty($_SESSION['filename'])) {
    $menu->showCropMenu();
    $image->checkCrop($menu);
    $menu->showSepia();
    if (!empty($_GET['sepia']) and $_GET['sepia'] == 'yes') {
        $image->applySepia();
    }
    $image->showImage();
    $image->saveImage();
}
?>
</center>
</body>
</html>
开发者ID:dmitrii89,项目名称:PHP_image_processing,代码行数:31,代码来源:index.php

示例3: image

$image->saveImage('test_03.png');
echo "<img hspace='2' vspace='2' src='test_03.png' border='0'>";
echo "<hr />";
echo "<p>draw a red alpha transparent filled box</p>";
$image = new image(50, 50);
$image->drawFilledRectangle(5, 5, 45, 45, 'ff000050');
$image->saveImage('test_04.png');
echo "<img hspace='2' vspace='2' src='test_04.png' border='0'>";
echo "<hr />";
echo "<p>draw a red alpha transparent filled blue bordered box with a border of 4 pixels</p>";
$image = new image(50, 50);
$image->drawFilledBorderedRectangle(5, 5, 45, 45, 4, '00007f50', 'ff000050');
$image->saveImage('test_05.png');
echo "<img hspace='2' vspace='2' src='test_05.png' border='0'>";
echo "<hr />";
echo "<p>draw a red alpha transparent filled blue bordered box.  The border will increase in size from 0 to 10 pixels pixels for the border and some white text in the box</p>";
for ($i = 0; $i <= 10; $i++) {
    $image = new image(200, 50);
    $image->drawFilledBorderedRectangle(0, 0, 200, 50, $i, '00007f50', 'ff000050');
    $image->addFont('verdana.ttf');
    $image->drawText(4, 14, 0, 'verdana.ttf', 12, 'ffffff00', 'Some text');
    $image->saveImage("test_06_" . $i . ".png");
    echo "<img hspace='2' vspace='2' src='test_06_" . $i . ".png' border='0'></br >";
}
echo "<hr />";
echo "<p>draw a red and blue alpha transparent box that overlap.  This demonstrates the alpha blending of the images</p>";
$image = new image(50, 50);
$image->drawFilledRectangle(5, 5, 30, 30, 'ff000050');
$image->drawFilledRectangle(20, 20, 45, 45, '0000ff50');
$image->saveImage('test_07.png');
echo "<img hspace='2' vspace='2' src='test_07.png' border='0'>";
开发者ID:kumarsivarajan,项目名称:ctrl-dock,代码行数:31,代码来源:test.image.class.php


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