Smart Image Processor PHP 2 Support Product Page


I have 2 different file uploads and I want to have 2 sipp do different things to each image upload?

Reported 02 May 2012 23:11:13
has this problem
02 May 2012 23:11:13 Phil Boyle posted:
The sipp codes as follows:
// Smart Image Processor PHP 2.0.9
if (isset($_GET['GP_upload'])) {
$sipp2 = new cGraphicMediator("upload", $ppu, "cBlogImage";
$sipp2->resizeEx(800, 600, true, false);
$sipp2->addWatermark("i/watermark.png", "Top-Right", false, "", "50";
$sipp2->overwrite = true;
// Smart Image Processor PHP 2.0.9
if (isset($_GET['GP_upload'])) {
$sipp1 = new cGraphicMediator("upload", $ppu, "cImage";
$sipp1->resizeEx(800, 800, true, false);
$sipp1->overwrite = true;

This works up to a point. The problem I have is that the image that is resized by sipp2 is resized to 600px wide instead of 800px. I've tried swapping them around and changing the 600px but then my watermark doesn't appear. If I can get this little bit sorted it will save me a heap of work.


Replied 03 May 2012 06:17:49
03 May 2012 06:17:49 Teodor Kuduschiev replied:
Please send me your php file to:
Replied 07 May 2012 06:37:12
07 May 2012 06:37:12 Teodor Kuduschiev replied:
Hello Phil,

I checked your page, the image uploaded from cBlogImage gets resized to 800x600 keeping the aspect ratio and it also gets watermarked.

The image uploaded from cImage gets resized to 800x800 keeping the aspect ratio also. Can you please tell me what exactly the problem is?
Replied 07 May 2012 22:18:15
07 May 2012 22:18:15 Phil Boyle replied:
The cBlogImage gets resized to 600x600 and I need it to stay 800 wide, height isn't important.

A possibly related issue is I thought file inputs with different names cImage and cBlogImage would store the name in the database in the field with the same name. It isn't all images names are going into cImage even when uploaded from cBlogImage.

Replied 08 May 2012 05:59:00
08 May 2012 05:59:00 Teodor Kuduschiev replied:
The cBlogImage actually gets resized to 800x600 keeping the aspect ratio. So if you are uploading an image that is 1000x1000 it will get resized to 600x600 as the 600px height is reached and it should keep the aspect ratio.
Replied 08 May 2012 10:25:14
08 May 2012 10:25:14 Phil Boyle replied:
Hi Teodor
Hey thanks for that . Got it working perfectly.

Reply to this topic