Re: Using GdkPixbuf buffers with GraphicsMagick

2009-01-06 Thread Dov Grobgeld
The data of a GdkPixbuf is layed out as a continous allocated chunk of
memory in one of the following format RGBRGBRGB for 24-bit images, or
RGBARGBARGBA, for 32-bit images, where R,G,B,A stands for the red, green,
blue, and alpha components respectively. Lines may be also padded to
row_stride bytes. Since you don't describe what GraphicsMagic() expects and
how you extracts the relevent info from the pixbuf, it is impossible to say
what went wrong.

In any case you can use any library, e.g. cairo, agg, OpenCV, or access the
pixels straight in the GdkPixbuf.

Regards,
Dov

2009/1/6 Luka Napotnik luka.napot...@gmail.com

 Hello.

 I'm trying to use GraphicsMagic (the successor of ImageMagick) to
 manipulate a GdkPixbuf image buffer. The problem is that the program
 segfaults, probably due to the raw nature of the buffer which the Magick
 API doesn't handle very good.
 I'm opening the image buffer with MagickReadImageBlob() and then apply
 some filters.

 Does anyone have experiences using GdkPixbuf together with
 GraphicsMagick or can anyone suggest alternatives to GraphicsMagick
 which works well with GdkPixbuf?

 Greets,
 Luka

 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using GdkPixbuf buffers with GraphicsMagick

2009-01-06 Thread jcupitt
2009/1/6 Luka Napotnik luka.napot...@gmail.com:
 Well I need a dither filter for my image buffer. That's why I'm looking
 at GraphicsMagick.

Oh, OK, vips does not have any dithering operations. I guess you know
about GdkPixbuf's dithering?

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using GdkPixbuf buffers with GraphicsMagick

2009-01-06 Thread Luka Napotnik
Hum could you please tell me more about gdkpixbuf dithering functions. I
was unable to fund such a function.

Greets,
Luka

Dne 06.01.2009 (tor) ob 12:06 + je jcup...@gmail.com zapisal(a):
 2009/1/6 Luka Napotnik luka.napot...@gmail.com:
  Well I need a dither filter for my image buffer. That's why I'm looking
  at GraphicsMagick.
 
 Oh, OK, vips does not have any dithering operations. I guess you know
 about GdkPixbuf's dithering?
 
 John
-- 
lp,
Luka

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using GdkPixbuf buffers with GraphicsMagick

2009-01-06 Thread jcupitt
2009/1/6 Luka Napotnik luka.napot...@gmail.com:
 Hum could you please tell me more about gdkpixbuf dithering functions. I
 was unable to fund such a function.

Just that it'll dither for you when drawing to the display. So if your
graphics card is 16 bits per pixel (eg. 6 bits of green, 6 red, 4 blue
or whatever), gdk will dither your 24-bit RGB image down for you.
It'll do palette-ized visuals as well.

http://library.gnome.org/devel/gdk/stable/gdk-Pixbufs.html

But perhaps you want to dither for some other reason?

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Generic character types of gregex are unrecognised

2009-01-06 Thread Liam R E Quin
On Wed, 2009-01-07 at 02:00 +0900, tks wrote:
[...]
   reg = g_regex_new (\d\D\s\S\w\W,
  0,
  0,
  error);


Watch out that \ is special in C strings, so you need
\\d\\D etc.

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk_main_iteration() exits app first time through

2009-01-06 Thread Garth's KidStuff
Hey All,

Some months ago, I asked how to make a modeless dialog (a progress dialog)
appear while continuing to execute in the main thread.  Someone (thanks!)
suggested using

while (gtk_events_pending())
gtk_main_iteration();

to make sure the new dialog gets shown.  I implemented that and it worked
great for the last 6 months or so.  Just today, I noticed that the program
exits the first time it calls gtk_main_iteration();

Does anyone know what happened?

TIA

-Garth
-- 
Garth Upshaw
Garth's KidStuff
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


rc file parsing help needed

2009-01-06 Thread Jack
I'd be happy to be pointed to the appropriate fine manual to read, 
but I haven't found anything yet that helps.

The problem showed up running Balsa on a non-Gnome system.  Many of the 
icons don't show up, and could not load image: Icon 'balsa_mbox_out' 
not present in theme shows up as the error message.  We figured out it 
was probably some missing part of gnome that normally got this 
resolved.  In fact, running the gnome-control-center and selecting a 
theme does fix the problem until a restart of X.

After lots of hunting, the Balsa team (thanks, guys) figured out the 
easiest fix was just to create ~/.gtkrc-2.0 with the single line 'gtk-
icon-theme-name = gnome' although I have since figured out that 'gtk-
fallback-icon-theme = gnome' also works.

In looking for a more automatic solution, we figured that calling 
gtk_rc_parse_string with one of the above strings should have the same 
effect.  Unfortunately, we have tried several variations, all with no 
apparent effect.  I have even tried renaming ~/.gtkrc-2.0 to another 
name so it is not automatically recognized, and then calling 
gtk_rc_parse(new file name) but again - no effect.

Is there something obvious we might be missing?  Is there something 
particular about when during app startup the parse function needs to be 
called to have an effect?

Any other hints or suggestions would be appreciated.

Thanks.

Jack
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list