Skip Menu |

This queue is for tickets about the GD-Thumbnail CPAN distribution.

Report information
The Basics
Id: 118655
Status: new
Priority: 0/
Queue: GD-Thumbnail

Owner: Nobody in particular
Requestors: lozier [...]

Bug Information
Severity: Normal
Broken in: 1.42
Fixed in: (no value)

Subject: _check_type not working when image blob is provided to create()
Download (untitled) / with headers
text/plain 928b
One of the documented methods for using this class is to pass an image blob as $image to the create() method. However, when this method is used, the incorrect mime type is used in the overlay on the thumbnail. For example, if I provide a jpeg blob, the thumbnail is correctly generated as jpeg but it has a "PNG" type listed in the overlay. But neither the original image nor the thumbnail is a PNG. It looks like this is caused by the _check_type() method returning the default type (PNG) when the $image argument is less than 255 characters long or doesn't have one the recognized extensions. (It won't have any valid extension if it's a blob.) It doesn't look like GD has a method for determining original file type. It looks like force_mime only forces the type of outputted thumbnail. Perhaps just allowing the option of passing in the original type to create() somewhere so the generated thumbnail will be correct?

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to