Search blog.co.uk

STICKY IntelliPhoto uses Microsoft GDI+ to Serve FabricLake!!!

by hspptubuk @ 2008-09-01 - 06:23:25

Tonight I made a special effect using basic Microsoft GDI+. Here you would see the image and its code:

fabriclake.carpetlake.intelliphoto4

public static Bitmap IntelliPhoto4()
{
Bitmap IntelliPhoto = (Bitmap)Bitmap.FromFile(@"digital-photo3.bmp");
int height = IntelliPhoto.Height;
int width = IntelliPhoto.Width;
double dia = (int)Math.Sqrt(height * height + width * width);
for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
Color pixColor = IntelliPhoto.GetPixel(j, i);
int sav = (pixColor.R + pixColor.G + pixColor.B) / 3 + 1;
int mav = (int)Math.Pow(pixColor.R * pixColor.G * pixColor.B, 0.333) + 1;
int g = (i * j) % 256;
int r = (i*(sav + mav) / 2) % 256;
int b = Math.Max(j*(r + g) / 2 % 256, 170);
// Step 1
if (g % 4 == 0)
IntelliPhoto.SetPixel(j, i, Color.FromArgb(r / 4, g / 4, b / 2));
else if (i * j % 10 == 0)
IntelliPhoto.SetPixel(j, i, Color.FromArgb(sav / 3, mav / 3, 255));
// Step 2
int trr = (int)Math.Sqrt(i * i + j * j);
int mod = (int)(255 - (255 * trr / dia));
pixColor = IntelliPhoto.GetPixel(j, i);
b = (int)Math.Min(pixColor.B + mod, 250);
g = (int)Math.Min(pixColor.G + mod, b * 0.95);
r = (int)Math.Min(pixColor.R + mod, r * 0.95);
IntelliPhoto.SetPixel(j, i, Color.FromArgb(r, g, b));
}
} // next i

return IntelliPhoto;

}


 
 

Poem of "Capri Software Ventures"

by hspptubuk @ 2008-09-20 - 08:06:42

By discarding the past, my mind takes off from the days that are the briskness of the coarse stream - the Teacher! It flies in low altitude as I am used to do. Watching dancing wet meadow gives it the ease to recall the best moments of my dreamful childhood, the golden time of this harsh life. It remembers the young wolf playing with colorful balloons, while the total life was packed in a small space surrounding by the house walls.

Sponsor:
Capri Software Ventures
http://www.shoes-away.com/

Footer

The content of this website belongs to a private person, blog.co.uk is not responsible for the content of this website.