public function testGetUploadTemp() { $this->assertNotNull(Dir::getUploadTemp()); $this->assertContains(DIRECTORY_SEPARATOR, Dir::getUploadTemp()); }
/** * Method to convert the image. * * @return void */ protected function convertImage() { // Define the temp converted image. $this->convertedImage = \Pop\File\Dir::getUploadTemp() . DIRECTORY_SEPARATOR . $this->img->getFilename() . '_' . time() . '.png'; // Convert the GIF to PNG, save and clear the output buffer. $this->img->convert('png')->save($this->convertedImage); // Re-instantiate the newly converted image object and re-read the image data. $this->img = new Gd($this->convertedImage); $this->imageData = $this->img->read(); }