Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Two bugs in photos part.


Go to End


2 Posts   3042 Views

Avatar
mateusz.ujma

Google Summer of Code Hacker, 6 Posts

10 April 2007 at 12:10pm

1.

Class GD located in sapphire/filesystem/GD.php

static function color_web2gd($image, $webColor) {
if(substr($webColor,0,1) == "#") $webColor = substr($webColor,1);
$r = hexdec(substr($webColor,0,2));
$g = hexdec(substr($webColor,2,2));
$b = hexdec(substr($webColor,2,2));

return imagecolorallocate($image, $r, $g, $b);
}

$g is the same as $b should be $b = hexdec(substr($webColor,4,2));

2.

If image gets corrupted during upload process i.e. network problems, resizing function will throw Fatal Error or cause a segmentation fault.

Avatar
Sigurd

Forum Moderator, 628 Posts

11 April 2007 at 7:40pm

Cheers Mateusz; again, like Elijah, its great to see you Google Summer of Coders scanning through code and providing patches, which, as Andy suggests, are now available for download :) This supports how you've been ranked for Google to approve for tomorrow's judgement day :)