Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Lenquist

@Lenquist
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problems converting color image to grayscale [modified]
    L Lenquist

    It works now, thanks for your answer!

    WPF com help

  • Problems converting color image to grayscale [modified]
    L Lenquist

    Already tried few different formulas (the one you proposed also) for calculating a gray pixel always with the same (bad looking) results.

    WPF com help

  • Problems converting color image to grayscale [modified]
    L Lenquist

    Hi everyone, it's my first post so be gentle :). I'm having difficulties converting a colored image to grayscale in a silverlight application. Clicking the link you can see the results of my code (left is the original pic right the resulting grayscale pic): Link I have no idea what I'm doing wrong. It should work but it doesn't. Help would be appreciated! One other thing, the WriteableBitmap.setPixel and WriteableBitmap.getPixel functions are part of the WritableBitmapEx library downloaded from Codeplex. Here's the code:

    private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
    {
    convertToGrayscale(new WriteableBitmap((BitmapSource)this.Original.Source));
    }

    	public void convertToGrayscale(WriteableBitmap image)
    	{
    		var p = image.Pixels;		
    		
    		for(int y=0; y
    

    modified on Sunday, September 26, 2010 8:09 AM

    WPF com help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups