PEGTOP
 pegtop.net  >  delphi section  >  articles  >  blend modes  >  final words 

 delphi section 

 articles 
 blend modes 
 introduction 
 normal mode 
 average mode 
 multiply mode 
 screen mode 
 darken mode 
 lighten mode 
 difference modes 
 overlay mode 
 hard light mode 
 soft light mode 
 dodge modes 
 burn modes 
 quadratic modes 
 additive modes 
 interpolation mode 
 logical modes 
 RGB modes 
 HSL modes 
 opacity 
 dark modes 
 bright modes 
 final words 

 components 

 about me 

rounding
Rounding can be done in different ways, so don't expect the results to be exactly the same with each software. x SHR 8 (which is very fast) equals x DIV 256, but x DIV 255 is more exact (the result differs by not more than 1/256). Sometimes (x+255) SHR 8 is used instead, which is more similar to x DIV 255. Rounding can vary a lot for color dodge and color burn, where division by x is used (particularly for small x).
download
You can download a small demo application (written in Delphi 3) for testing all blend modes dicussed here, for analyzing other ones, and for generating new ones.

You can also download another demo with source code (written in Delphi 5), which might give you an idea how to implement blend modes.
contact
Jens Gruschel
Please use the mail form at www.pegtop.net to email me.
Thanks to Michael Hansen (dyster_tid@hotmail.com) for interesting discussions and for introducing the reflect mode, and to Francesco Savastano for many emails about this theme and for a better soft light algorithm.
links
www.g32.org
Graphics32 is a fast 32 bit graphics library for Delphi, that includes layers with blend modes (and much more). Michael Hansen also wrote some unit which defines the modes you can find on this page (you can find a download link at the third party section of the Graphics32 page).
index | previous page | next page
 
© Copyright 2006 by PEGTOP Software