Textimage breaks on servers with module version of GD

krasmussen - May 18, 2009 - 11:46
Project:Textimage
Version:6.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Many Drupal users suffer from the annoyances of the official GD version which doesn't support functions such as imagerotate(). Among these are all Debian/Ubuntu users who do not want to compile their own PHP, since the official PHP package for these distributions do not include a compiled-in GD library.

This breaks any attempt to use Textimage with "Fatal error: Call to undefined function imagerotate()". Testing for the function before calling it enables all features except rotation, however.

textimage.module line 728

if ($rotation !== 0) {
    $image = imagerotate($image, $rotation, 0);
}
should be replaced with
if ($rotation !== 0 && function_exists("imagerotate")) {
    $image = imagerotate($image, $rotation, 0);
}

Of course, it would be best to alert the users with modular GD somehow in case they try to use rotation, but this quick fix makes the module work for all those who don't need the feature.

#1

Deciphered - June 1, 2009 - 00:06

Hi krasmussen,

Sorry for the late response.

This is extremely unfortunate, but definitely rings a bell.
I will look into alternatives and see what I can come up with.

Cheers,
Deciphered.

#2

Deciphered - June 2, 2009 - 22:31
Status:active» fixed

Fix committed to HEAD, DRUPAL-6--2 and DRUPAL-5--2.

Added a modified copy of the imagerotate function from imageapi, so should work on any environment now.

Cheers,
Deciphered.

#3

System Message - June 16, 2009 - 22:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.