Applies a pixel-level filter to the image.
filter(type, *args)
img.filter("negate")
Inverts image colors.
img.filter("grayscale")
Converts the image to grayscale.
img.filter("brightness", value)
value: Integer (negative to darken, positive to brighten)img.filter("contrast", value)
value: Integer (negative/positive depending on libgd behavior)img.filter("colorize", r, g, b, a)
Applies a color overlay.
r, g, b: 0..255a: 0..127 (GD alpha)img.filter("sepia")
Applies a sepia tone. Implemented in ruby-libgd.
The underlying implementation maps to libgd filters where available; sepia is provided by ruby-libgd.