X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fimages%2Fextended%2Fclass_PngImage.php;h=f81e609f38c887dce7dd126b2e4ebba0740f879b;hp=86f6124cd25a6db57b25527e166a32999db2b986;hb=HEAD;hpb=a60894f1d6ef33613d2d0351075aa07aa257f304 diff --git a/framework/main/classes/images/extended/class_PngImage.php b/framework/main/classes/images/extended/class_PngImage.php deleted file mode 100644 index 86f6124c..00000000 --- a/framework/main/classes/images/extended/class_PngImage.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team - * @license GNU GPL 3.0 or any newer version - * @link http://www.shipsimu.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -class PngImage extends BaseImage { - /** - * Protected constructor - * - * @return void - */ - protected function __construct () { - // Call parent constructor - parent::__construct(__CLASS__); - } - - /** - * Creates an instance of this image class - * - * @param $templateInstance A template instance - * @return $imageInstance An instance of this image class - */ - public static final function createPngImage(CompileableTemplate $templateInstance) { - // Get a new instance - $imageInstance = new PngImage(); - - // Set template instance - $imageInstance->setTemplateInstance($templateInstance); - - // Set image type - $imageInstance->setImageType('png'); - - // Return the instance - return $imageInstance; - } - - /** - * Finish this image by producing it - * - * @return void - * @todo Rewrite this to SplFileInfo/Object - */ - public function finishImage () { - $this->partialStub('Unfinished method.'); - return; - - // Call parent method - parent::finishImage(); - - // Get a file name for our image - $cacheFile = $this->getTemplateInstance()->getImageCacheFile(); - - // Does it exist? - if (FrameworkBootstrap::isReadableFile($cacheFile)) { - // Remove it - unlink($cacheFile->getPathname()); - } // END - if - - // Finish the image and send it to a cache file - imagepng($this->getImageResource(), $cacheFile->getPathname(), 9, PNG_ALL_FILTERS); - } - -}