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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Image rotate($angle)


Reply


4 Posts   356 Views

Avatar
ambient

Community Member, 123 Posts

2 December 2013 at 3:36am

Hi all,
I'm using Arams tutorial from [url=http://www.ssbits.com/tutorials/2010/rotating-and-greyscaling-images-using-gd-and-decorators/]ssbits [/url] to rotate my images but unfortunately when the image is rotated it has a black background even as a png.
Is it possible to make the background clear so that the background image will show?
Thanks!

Avatar
martimiz

Forum Moderator, 1132 Posts

4 December 2013 at 12:10am

More people have commented on the fact that Silverstripe's GD->rotate() function doesn't support png transparency.

I'm not sure if this is still the case in 3.1, but if so, maybe someone has written a GD decorator that supports this? Or some third-party module? Worth a try to look for something like that.

Avatar
ambient

Community Member, 123 Posts

4 December 2013 at 3:07am

Hi again Martimiz :)

I hadn't realised it didn't support png. And i'm on SS2.4 for this website. (I haven't actually worked with SS3 yet).

Ah well, back to photoshop so :)

Cheers!

Avatar
martimiz

Forum Moderator, 1132 Posts

4 December 2013 at 10:12am

For the record: It does support png, just not the transparancy bit it seems :)