Created
September 14, 2011 00:00
-
-
Save fabioluciano/1215514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Abstract_Factory_Convert_JPG extends Convert_Abstraction_Factory { | |
const EXTENSION = '.jpg'; | |
public function __construct() { | |
parent::__construct(); | |
} | |
public function image_convert($img) { | |
$name = $this->to_pnm($img); | |
exec('pnmtojpeg ' . self::TMP_PATH . DIRECTORY_SEPARATOR . $name . '.pnm > ' . self::CONV_PATH . DIRECTORY_SEPARATOR . $name . self::EXTENSION); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment