private static Bitmap GetSymbol(string bitmapname) { Bitmap bitmap = null; try { var filename = string.Format(CultureInfo.InvariantCulture, "Earthwatchers.UI;component/Resources/Images/{0}", bitmapname); var resourceInfo = Application.GetResourceStream(new Uri(filename, UriKind.Relative)); bitmap = new Bitmap { Data = resourceInfo.Stream }; } catch { //TODO: error handling } return bitmap; }
public bool Equals(Bitmap bitmap) { if (!CompareMemoryStreams(data, bitmap.data)) return false; return true; }