Hey,
I trying to use "convert "test.gif" -layers Optimizetransparency"
with PHP but it doesn't work and no error returns!
any help would be appreciated!
Best Regards, Asac
Optimizetransparency - PHP
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Optimizetransparency - PHP
You don't give an output file name to start with. so the argument to -layers will be the output filename, which means -layers will error with a 'missing argument'
Change your PHP code so you can see the output of standard error, and confirm the diagnosis.
Change your PHP code so you can see the output of standard error, and confirm the diagnosis.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Optimizetransparency - PHP
Hey,
Ive changed my Parameter String!
So at the moment it looks like this:
but there is no error and it doesn't work :/
PHP Code:
Ive changed my Parameter String!
So at the moment it looks like this:
Code: Select all
convert convert/tmpCacheFolder/08-17-0874494615output.gif -layers optimizetransparency convert/tmpCacheFolder/test.gif
PHP Code:
Code: Select all
function compress($file)
{
$convert = 'convert '.$file.' -layers optimizetransparency convert/tmpCacheFolder/test.gif';
$return = system($convert, $retval);
return $return;
Re: Optimizetransparency - PHP
If it does not work try a simple version first - the file in the same folder as the code and not in a function. This will prove if the code is OK and you can expand it into a function when you get it to work.
I do not need the '.$file.' written like that try this:
I do not need the '.$file.' written like that try this:
Code: Select all
function compress($file)
{
$convert = 'convert $file -layers optimizetransparency convert/tmpCacheFolder/test.gif';
$return = system($convert, $retval);
return $return;
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Optimizetransparency - PHP
Whar version of IM is it? Optimize Transparency was added to Version 6.3.3-4 for releases after 28 March 2007. Many websites do not have a new enough version.
Check the Rubble Web website for methods to get the errors which is probably getting recorded into the web servers error log, which is not normall visible to web client, only to the web administrator. If it is not working there should be some sort of error, even if it is a simple 'unable to write'.
Check the Rubble Web website for methods to get the errors which is probably getting recorded into the web servers error log, which is not normall visible to web client, only to the web administrator. If it is not working there should be some sort of error, even if it is a simple 'unable to write'.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Optimizetransparency - PHP
Hey,
i used Version Command and it returns:
is this ok!?
i used Version Command and it returns:
Code: Select all
Version: ImageMagick 6.2.4 02/10/07
Re: Optimizetransparency - PHP
No you have version 6.2.4 and Anthony says you need at least 6.3.3-4 The latest version is 6.4.3-1