Download & Extend

warning: Division by zero in /var/www/default/modules/imageapi/imageapi.module on line 221.

Project:ImageAPI
Version:6.x-1.9
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

It happens sometimes when uploading the images.
See the screenshot.

The code:

<?php
function imageapi_image_scale(&$image, $width = NULL, $height = NULL, $upscale = FALSE) {
 
$aspect = $image->info['height'] / $image->info['width'];
?>
AttachmentSize
Picture 19.png62.75 KB

Comments

#1

Title:Warning: Division by zero in imageapi_image_scale() (line 222 of imageapi/imageapi.module)» warning: Division by zero in /var/www/default/modules/imageapi/imageapi.module on line 221.

Please Help me to fix this problem....It's urgent....Please......

#2

Try to install the php5-gd package on your server.
It worked for me.

#3

GD is already installed on my system. I transferred my files from development to production environment.
Both the environment are same but somehow uploading image showing an error " warning: Division by zero in /web/thecabin.net/htdocs/sites/all/modules/contrib/imageapi/imageapi.module on line 221."

Please help me in this.

Thanks in advance

nobody click here