Jump to content

[Fix] for large image resizing


Recommended Posts

As most servers have image magic installed this is a very quick fix i did for a client of mine who is too stupid to do anything but upload 1MB pics from her digital camera.

This will make them 1000px wide which is just enough for image magic to finish them off.

/admin/functions.php (around line 343)


find:

function    imageResize($sourceFile, $destFile, $destWidth = NULL, $destHeight = NULL, $fileType = 'jpg')

{

   if (!isset($sourceFile['tmp_name']) OR !file_exists($sourceFile['tmp_name']))



replace with:

function    imageResize($sourceFile, $destFile, $destWidth = NULL, $destHeight = NULL, $fileType = 'jpg')

{
exec('convert ' . $sourceFile['tmp_name'] . ' -resize 1000x ' . $sourceFile['tmp_name']);
   if (!isset($sourceFile['tmp_name']) OR !file_exists($sourceFile['tmp_name']))

Link to comment
Share on other sites

×
×
  • Create New...