Author: skywhat

ideal growth rate for a dynamically allocated array

allocate 16*1.5=24  deallocate 16
allocate 24*1.5=36. deallocate  16+24=40
allocate 36*1.5=54. deallocate  40+36=76
allocate 54*1.5=81 deallocate.  76+54=130
allocate 81*1.5=121.5 < 130 reuse
choosing 1.5 as the factor allows memory reuse after 4 reallocations; 1.45 allows memory reuse after 3 reallocations; and 1.3 allows reuse after only 2 reallocations.

AlphaBlendMatrix and how to resize the image by C#

The description about Alpha Blending in MSDN is as follows

Alpha Blending Lines and Fills

In GDI+, a color is a 32-bit value with 8 bits each for alpha, red, green, and blue. The alpha value indicates the transparency of the color — the extent to which the color is blended with the background color. Alpha values range from 0 through 255, where 0 represents a fully transparent color, and 255 represents a fully opaque color. Continue reading