Viktor
May 8, 2012, 12:34 PM
Hello all,
If you have problems with upload images with jpeg type you can fix it yourself. (if you know php of course :) )
Open file ftp: includes>>classes>>rlCrop.class.php
find method 'saveImage'
and change code from:
switch($ext) {
case 'gif':
if($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
{
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$saved = $func($this->_imgFinal, $filename);
break;
case 'jpg':
$saved = $func($this->_imgFinal, $filename, $quality);
break;
}
to:
switch($ext) {
case 'gif':
if($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
{
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$saved = $func($this->_imgFinal, $filename);
break;
case 'jpg':
case 'jpeg':
$saved = $func($this->_imgFinal, $filename, $quality);
break;
}
and find method 'showImage' and change code from:
switch($type) {
case 'gif':
if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) {
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$func($this->_imgFinal);
break;
case 'jpg':
$func($this->_imgFinal, '', $quality);
break;
}
to:
switch($type) {
case 'gif':
if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) {
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$func($this->_imgFinal);
break;
case 'jpg':
case 'jpeg':
$func($this->_imgFinal, '', $quality);
break;
}
Then if you want to delete empty images downloaded before go to ftp and open file: ftp:libs>>upload>>upload.php
Find method 'delete' and find line:
$success = $id == $listing_id && is_file($file_path) && unlink($file_path);
and change to:
$success = $id == $listing_id;
unlink($file_path);
If you have problems with upload images with jpeg type you can fix it yourself. (if you know php of course :) )
Open file ftp: includes>>classes>>rlCrop.class.php
find method 'saveImage'
and change code from:
switch($ext) {
case 'gif':
if($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
{
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$saved = $func($this->_imgFinal, $filename);
break;
case 'jpg':
$saved = $func($this->_imgFinal, $filename, $quality);
break;
}
to:
switch($ext) {
case 'gif':
if($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal))
{
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$saved = $func($this->_imgFinal, $filename);
break;
case 'jpg':
case 'jpeg':
$saved = $func($this->_imgFinal, $filename, $quality);
break;
}
and find method 'showImage' and change code from:
switch($type) {
case 'gif':
if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) {
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$func($this->_imgFinal);
break;
case 'jpg':
$func($this->_imgFinal, '', $quality);
break;
}
to:
switch($type) {
case 'gif':
if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) {
imagetruecolortopalette($this->_imgFinal, false, 255);
}
case 'png':
$func($this->_imgFinal);
break;
case 'jpg':
case 'jpeg':
$func($this->_imgFinal, '', $quality);
break;
}
Then if you want to delete empty images downloaded before go to ftp and open file: ftp:libs>>upload>>upload.php
Find method 'delete' and find line:
$success = $id == $listing_id && is_file($file_path) && unlink($file_path);
and change to:
$success = $id == $listing_id;
unlink($file_path);