Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
We found an issue in image_gd_rotate function. That's because of behaviour of imagerotate function in 2.1.1-dev version of gd library (PHP 5.5.6-1+debphp.org~precise+2). If you pass -1 as third parameter to this function, it returns false, but if you pass the same values in 2.1.0 version of gd library (PHP 5.3.27-1~dotdeb.0), it returns the rotated image. To avoid errors on 2.1.1-dev version our proposition is to use white color if imagecolortransparent function above returns -1.
Comment | File | Size | Author |
---|---|---|---|
#2 | system-rotation-background-fix-2148861.patch | 522 bytes | twistor |
#1 | system-rotation-background-fix-2148861.patch | 522 bytes | InternetDevels |
Comments
Comment #1
InternetDevels CreditAttribution: InternetDevels commentedComment #2
twistor CreditAttribution: twistor as a volunteer commentedRe-uploading for testbot.
Comment #4
teknocat CreditAttribution: teknocat commentedInternetDevil's patch in comment #1 seems to be the right fix.
The problem here is that the imagecolortransparent function always returns a -1 when there is no transparent colour in the image, but on line 136 where it tests to see if there is no transparent colour it is checking to see if the return value is zero.
Documentation for imagecolortransparent:
http://php.net/manual/en/function.imagecolortransparent.php
Comment #5
twistor CreditAttribution: twistor as a volunteer commentedThis issue, #2215369: Various bugs with PHP 5.5 imagerotate(), including when incorrect color indices are passed in is getting all the love.
Tentatively closing this.