Skip to content

Instantly share code, notes, and snippets.

@fabioluciano
Created September 14, 2011 00:02
Show Gist options
  • Save fabioluciano/1215516 to your computer and use it in GitHub Desktop.
Save fabioluciano/1215516 to your computer and use it in GitHub Desktop.
<?php
class Abstract_Factory_Convert_PNG extends Convert_Abstraction_Factory {
const EXTENSION = '.png';
public function __construct() {
parent::__construct();
}
public function image_convert($img) {
$name = $this->to_pnm($img);
exec('pnmtopng ' . 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