Jump to:

23380 Posts in 18310 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » GD class question

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

Page: 1
Go to End
Author Topic: 1031 Views
  • dynamite
    Avatar
    Community Member
    66 Posts

    GD class question Link to this post

    Hello,

    I wold like to merge two GD images together. Anyone else tried something similar? Or anyone else have some ideas? I looked at the API documentation but didn't see anything that could do that.

    Thanks!

    Jeremy

  • banal
    Avatar
    Community Member
    901 Posts

    Re: GD class question Link to this post

    Hi

    It's certainly doable. The SilverStripe GD class is just a wrapper around the PHP GD functionality (http://php.net/manual/en/ref.image.php). You can do a lot using these functions. If you're doing per-pixel operations, prepare for a performance hit though (at least when processing larger images).
    You can create a subclass of the SilverStripe GD class where you implement the desired functionality. Then create a subclass of the Image class and override generateFormattedImage (to use your custom GD class instead of the default one). You can also implement different custom generate methods to use them in your templates (http://doc.silverstripe.com/doku.php?id=recipes:customising_image).

  • dynamite
    Avatar
    Community Member
    66 Posts

    Re: GD class question Link to this post

    Cool, thanks for the info! I will try it out.

    1031 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.