已锁定 Cropping Image in Silverlight

  • 2012年3月15日 6:49
     
     
    I need to crop a BitmapImage in silverlight. I went thorugh many articles on internet using google and I found many examples showing CroppedBitmap, but I am not able to find any such class in  my Silverlight version4.0. Can anyone guide me for this ??

全部回复

  • 2012年4月3日 20:54
     
      包含代码

    Sl doesn't have CroppedBitmap, it exist on wpf. Use the next for getPixels:

            private int GetPixel(WriteableBitmap bm,int x,int y)
           
    {
               
    return bm.Pixels[bm.PixelWidth * y + x];
           
    }

  • 2012年4月19日 4:57
     
     
    thanks a lot