Skip to content
vincent-petithory edited this page Sep 13, 2010 · 6 revisions

Welcome to the stdpx wiki!

Project design and guidelines

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.

Guidelines of the project

  • “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.

Contents Summary

The STDPX library is divided into four sub parts :

  • Blend modes
    Located in the stdpx.blendmodes package, you will find shaders that merge two images between them.
  • Filters
    Located in the stdpx.filters package, you will find shaders that create various effects on an image.
  • Fills
    Located in the stdpx.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 the stdpx.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 the stdpx.util package, it contains classes that might help you using shaders.
  • Types
    Located in the stdpx.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 the ChannelTransform class for the ChannelMixerFilter.

Content

1. Blend modes
h3. Well-known blend modes not found in flash player

  1. Color Burn
  2. Color Dodge
  3. Linear Burn
  4. Linear Dodge
  5. Linear Light
  6. Pin Light
  7. Vivid Light
  8. Soft Light
  9. Darker Color
  10. Lighter Color
  11. Hard Mix
  12. Exclusion
  13. Color
  14. Hue
  15. Saturation
  16. Luminosity

Additionnal blend modes

  1. Average
  2. Invert Average
  3. Inclusion
  4. Negation
  5. See Through
  6. Luma

Blend modes already in Flash Player

  1. Add
  2. Alpha
  3. Darken
  4. Difference
  5. Erase
  6. Hard Light
  7. Lighten
  8. Multiply
  9. Normal
  10. Overlay
  11. Screen
  12. Subtract

2. Filters

  1. Layer Mask (works the same as Photoshop layer mask feature)
  2. Channel (disable RGBA channels)
  3. Channel Mixer (mix channels between them, which allows color balance adjustments)
  4. Contrast/Lightness (adjust lightness and contrast)
  5. Dissolve (adds noisy pixels around transparent areas)
  6. EdgeDetection (turns the image into black and reveals the outline in white)
  7. Gamma (change the gamma of the image)
  8. Grayscale (turns an image into grayscale using luminances)
  9. HSVColor (Allows hue, saturation and value adjustments — just like the Hue/Saturation tool of Photoshop)
  10. Lighting (creates an omni light source in the image)
  11. Negative (inverts the colors of an image)
  12. Noise (adds noise on the image)
  13. Rasterize (increases pixel sizes)
  14. Scatter (make the pixels noisy)
  15. WebColor (restricts the color palette to web colors)
  16. ZoomLinear (zooms at a target point of the image and applies a basic interpolation)

3. Fills

  1. Fills for RGB color space
  2. Fills for HSV color space
  3. Fills for HSL color space
  4. Fills for CIE L*C*H° color space

4. Jobs

  1. HSLColorJob (generates a batch of colors in the HSL color space)
  2. HSVColorJob (generates a batch of colors in the HSV color space)

References

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).