-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the stdpx wiki!
This project is meant to be a standard library of pixel bender kernels. Filters, fills, blendmodes and jobs are available.
However, we focused on blend modes and filters. As blend modes are quite complete now, we focus on filters. Fills and jobs are secondary.
Many of the elements of this library are tightly linked to color manipulation. They benefit of a good knowledge of color theory and color spaces, which guarantee compatible behaviors with common image manipulation softwares.
For example, all written blendmodes behaves like the ones of Photoshop, especially those involving color spaces conversions.
- “You ain’t gonna need it” . A quote taken from eXtreme Programming that fits well with the way this library was built : you will find filters/blend modes/jobs that are or have been used in production. There is no place for kernels you will never have a chance to use.
- Strict compatibility with color theory : Kernels’ code was adjusted to fit exactly the standard behavior of color spaces.
- Standard blend modes : Many blend modes are standard and their behavior is defined. Those standards were followed.
- Performance : You don’t want your application to use too much cpu cycles for simply rendering blend modes, filters or run shader jobs.
The STDPX library is divided into four sub parts :
- Blend modes
Located in thestdpx.blendmodes
package, you will find shaders that merge two images between them. - Filters
Located in thestdpx.filters
package, you will find shaders that create various effects on an image. - Fills
Located in thestdpx.fills
package, you will find shaders to use for filling an area of your application. Actually, most of those fills are designed to draw the colors of a color space like RGB,CMYK,HSV,HSL,CIE L*C*H°. - Jobs
Located in thestdpx.jobs
package, you will find shaders that generate batches of numbers from an input. Actually, most of them generate 24-bit RGB colors from inputs of several color spaces.
There are two additional parts :
- Utilities
Located in thestdpx.util
package, it contains classes that might help you using shaders. - Types
Located in thestdpx.types
package, many of the available classes are used internally by all other parts of the library. Some of them are nevertheless necessary for specific classes, like theChannelTransform
class for theChannelMixerFilter
.
- Color Burn
- Color Dodge
- Linear Burn
- Linear Dodge
- Linear Light
- Pin Light
- Vivid Light
- Soft Light
- Darker Color
- Lighter Color
- Hard Mix
- Exclusion
- Color
- Hue
- Saturation
- Luminosity
- Average
- Invert Average
- Inclusion
- Negation
- See Through
- Luma
- Add
- Alpha
- Darken
- Difference
- Erase
- Hard Light
- Lighten
- Multiply
- Normal
- Overlay
- Screen
- Subtract
- Layer Mask (works the same as Photoshop layer mask feature)
- Channel (disable RGBA channels)
- Channel Mixer (mix channels between them, which allows color balance adjustments)
- Contrast/Lightness (adjust lightness and contrast)
- Dissolve (adds noisy pixels around transparent areas)
- EdgeDetection (turns the image into black and reveals the outline in white)
- Gamma (change the gamma of the image)
- Grayscale (turns an image into grayscale using luminances)
- HSVColor (Allows hue, saturation and value adjustments — just like the Hue/Saturation tool of Photoshop)
- Lighting (creates an omni light source in the image)
- Negative (inverts the colors of an image)
- Noise (adds noise on the image)
- Rasterize (increases pixel sizes)
- Scatter (make the pixels noisy)
- WebColor (restricts the color palette to web colors)
- ZoomLinear (zooms at a target point of the image and applies a basic interpolation)
- Fills for RGB color space
- Fills for HSV color space
- Fills for HSL color space
- Fills for CIE L*C*H° color space
- HSLColorJob (generates a batch of colors in the HSL color space)
- HSVColorJob (generates a batch of colors in the HSV color space)
Many of the blend modes and filters formulas did not come out from nowhere. Many of them, especially the standard ones mentioned earlier, can be found in Adobe Photoshop Help (or at least a good description instead of the formula, which is sufficient).