blog vipa

blog vipa
mój dzień to 3 filiżanki kawy

System.Drawing.Image conversion to Gdk.Pixbuf

luty 27, 2007 | 01:21

Recently, I’ve been using ZedGraph under Gtk# to draw simple plots, but I’ve found a problem with displaing it under Gtk# forms, not the Windows.Forms. The (not) easiest thing, is to convert the plot to the bitmap image.

I’ve spent a lot of time searching for solution how to convert it to Pixbuf, the one is here:

C#:
  1. private static Gdk.Pixbuf ImageToPixbuf(Image image)
  2. {
  3.   using (MemoryStream stream = new MemoryStream())
  4.   {
  5.     image.Save(stream, ImageFormat.Bmp);
  6.     stream.Position = 0;
  7.     Gdk.Pixbuf pixbuf = new Gdk.Pixbuf(stream);
  8.     return pixbuf;
  9.   }
  10. }

Dwie fajne animacje flash

luty 7, 2007 | 23:41

Milion razy dziękuję oraz ahhhahaa. Fajne.


Tapeta PLD

luty 5, 2007 | 17:38

I stało się, wrzuciłem na kde-look moją tapetkę dla PLD :-)

Wiem wiem, gradienty wyglądają słabo, ale inkskape chyba nie potrafi inaczej… a może to ograniczenie PNG? Dla chętnych, wersja wektorowa.

Syntek Webcam & Linux (05e1:0501)

luty 2, 2007 | 20:36

With help of my friend, yoB, I’ve got working ASUS F2J webcam (Syntek STK-1135 probably).

Me

Czytaj resztę wpisu »

Sesja

luty 1, 2007 | 20:44

Ostatnio dużo się dzieje… Czytaj resztę wpisu »