Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 736 Bytes

Readme.md

File metadata and controls

32 lines (22 loc) · 736 Bytes

Sledgehammer Graphics module

Build Status

Features

  • Compose images via layers.
  • Use CSS notation for colors "white", "#ff8800" or "rgba(255,130, 0, 0.5)"
  • Use CSS notation for text "bold 18px Arial, sans-serif"
  • Autodetect filetype and support for bmp.

Datastructure

Modelled after Adobe Photoshop's layers & folders.

  • Composition
    • TextGraphics
    • Composition
      • Canvas
      • Image
    • Image

Creating an image object

Example usage

     $image = new Image('/path/to/my-image.jpg');
     $resized = $image->resized(120, 100);
     $resized->saveAs('/path/to/my-image-as-120x100.png');