Skip to content

Commit

Permalink
Merge pull request #167 from ins0/feature/paa
Browse files Browse the repository at this point in the history
Update PAA Image Conversation
  • Loading branch information
ins0 authored May 25, 2018
2 parents bd687d6 + 9b97ea9 commit 2e958cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function convertFromTGA($sourceImage)
$imageTGA->destroy();
$imageTGA->clear();

$command = 'cd '.escapeshellcmd(escapeshellarg(dirname($sourceImage))).' && wine /var/www/racecore/library/TexView2/Pal2PacE.exe ' . escapeshellcmd(escapeshellarg(basename($tgaPath))) . ' ' . escapeshellcmd(escapeshellarg(basename($tgaPath, '.tga') . '.paa'));
$command = 'cd '.escapeshellcmd(escapeshellarg(dirname($sourceImage))).' && wine /var/www/armasquads/tool/ImageToPAA/ImageToPAA.exe ' . escapeshellcmd(escapeshellarg(basename($tgaPath))) . ' ' . escapeshellcmd(escapeshellarg(basename($tgaPath, '.tga') . '.paa'));
exec($command, $response);

@unlink($tgaPath);
Expand All @@ -59,7 +59,7 @@ public function convert($sourceImage)
{
Try {
// convert to paa
$command = 'cd '.escapeshellcmd(escapeshellarg(dirname($sourceImage))).' && wine /var/www/racecore/library/TexView2/Pal2PacE.exe ' . escapeshellcmd(escapeshellarg(basename($sourceImage))) . ' ' . escapeshellcmd(escapeshellarg(basename($sourceImage, '.png') . '.paa'));
$command = 'cd '.escapeshellcmd(escapeshellarg(dirname($sourceImage))).' && wine /var/www/armasquads/tool/ImageToPAA/ImageToPAA.exe ' . escapeshellcmd(escapeshellarg(basename($sourceImage))) . ' ' . escapeshellcmd(escapeshellarg(basename($sourceImage, '.png') . '.paa'));
exec($command, $response);

if( isset($response[1]) && strstr(strtolower($response[1]), "error" ))
Expand Down
2 changes: 1 addition & 1 deletion public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
error_reporting(E_ALL);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
define('REQUEST_MICROTIME', microtime(true));
define('ROOT_PATH', __DIR__);

Expand Down

0 comments on commit 2e958cf

Please sign in to comment.