Image Resize Errors

Riceman 31 Jan, 2012
I am getting a whole lot of errors and the images are being sent, but not resized.
Here is a direct link to the form:

http://realestatemobileservices.com/index.php?option=com_chronocontact&chronoformname=File_Uploader

And here are the errors I get on Submit:

Warning: Division by zero in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 594

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 603

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 604

Warning: imagefilledrectangle(): supplied argument is not a valid Image resource in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 606

Warning: imagealphablending(): supplied argument is not a valid Image resource in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 607

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 610

Warning: unlink(/home/rems808/public_html/upload) [function.unlink]: Is a directory in /home/rems808/public_html/components/com_chronocontact/plugins/cf_image_resize.php on line 479
GreyHead 31 Jan, 2012
Hi Riceman,

It sounds as though the PHP getimagesize() function that is used to get the original height and width of the uploaded image is returning a zero height - or not returning anything. I suggest that you run a little check with some debug code to see if this function is enabled on your PHP installation.

Bob
Riceman 31 Jan, 2012
I'll check. Before I do, can I ask a quick Question about the re-sizer, its not worth troubleshooting if I can't accomplish what I need.

Is it possible to have the width of the image re-sized to say 300px wide, but get the height of the image to be constrained relative to the width? For instance, I don't want to the image heights getting squashed or stretched.
GreyHead 31 Jan, 2012
Hi Riceman,

It looks as though this has the same options as the old version 'Resize' or 'Resize and Crop' both maintain the image proportions, the second crops part of the image to fill the specified new size. The second resizes within the new size without cropping so may have bars at top or bottom.

Bob
Riceman 31 Jan, 2012
Ideally I would like the "resize and crop" ability. But I only have the option to select one or the other...see attachment:

[attachment=0]Screen Shot 2012-01-31 at 11.37.18 AM.png[/attachment]
GreyHead 01 Feb, 2012
Hi Riceman,

Ok - that's CFv3 and I was looking at the action for CFv4. The underlying code and the explanation are the same.

Bob
GreyHead 03 Feb, 2012
Hi Riceman,

Once I got the file upload working correctly all the errors on my test form disappeared and the re-sizer produced the images as specified.

Please check the settings on the File Upload tab and if necessary put the enctype='multipart/form-data' tag in the Form Tag Attachment box on the General tab.

Bob
Riceman 03 Feb, 2012
Thanks Greyhead,

But I still am getting the errors. I did put the "enctype='multipart/form-data'" in the appropriate spot on the General Tab, and the Uploads Tab looks OK to me. As I said, I do receive the images in an email, but not re-sized.

With the possibility of throwing a wrench into the system, do you think that if I upgrade to CFv4, will that make things easier?

Can I "upgrade" or do I have to recreate the forms from scratch?

If I do upgrade, will this possibly help my other multiple forms issue in this thread?
http://chronoengine.com/forums.html?cont=posts&f=2&t=66092

You can try my upload form here(i have just been testing with one image):
http://realestatemobileservices.com/index.php?option=com_chronocontact&chronoformname=File_Uploader
GreyHead 03 Feb, 2012
Hi Riceman,

There are two problems that I can see (a) the Image Resizer only re-sizes one image from your form and you have ten of them; (b) there's no automatic way of attaching the re-sized image(s) to an email.

Both of these can be resolved by custom coding but it may not be worth the effort. Someone posted here recently about a multi-upload module that I think re-sized all the images. I forget the name but the post was in the last few days.

Joomla 1.5 is fast approaching its 'drop-dead' date so it may be worth upgrading to CFv4 with that move in mind. The problem is that you will need to recreate most of your forms. You can copy and paste over the From HTML and other code blsock but usually it's better to start over unless the forms are very complex.

Bob
This topic is locked and no more replies can be posted.