6.x-1.0-alpha version - here's fix for a bug in the call to image_scale_and_crop in image.module:

I turned on Scale and Crop for Thumbnails (it used to be Scale only).
Then I visited an image gallery. I got all the proper messages, saying the images would rebuilding. But then at the bottom I got "Unable to build images".
Logs showed:
Division by zero in /.../includes/image.inc on line 160.

Found the problem in image.module, here's the fixed call to image_scale_and crop, original code had $destination instead of $original_path:

      case 'scale_crop':
        $status = image_scale_and_crop($original_path, $destination,  $size['width'], $size['height']);                                                                          
        break;                                                                 
CommentFileSizeAuthor
#2 image_257167.patch680 bytesdrewish

Comments

tomsolo’s picture

Fix is work. thx

drewish’s picture

Status: Active » Fixed
StatusFileSize
new680 bytes

thanks, committing the attached patch to head.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

drewish’s picture

marked #223836: Division by zero warning in image.inc, no images created. as a duplicate... though it really should be the other way around.