Skip to content

Commit

Permalink
update paa image conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
ins0 committed May 25, 2018
1 parent bd687d6 commit 21b9dfc
Showing 1 changed file with 2 additions and 2 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

0 comments on commit 21b9dfc

Please sign in to comment.