The following code does it:
// your original data assumed to be in a continous structure of gray.
// Preferably in a structure.
float *src_buf;
int img_width = 256;
int img_height = 256;
// You destination
GdkPixbuf *dst = gdk_pixbuf_new(...);
guint8 *dst_buf = gdk_pixbuf_get_data();
guint src_st
Thanks for reply.
Can you please elaborate more on Converting More than 8bit image to 8
bit image.
And, apart from GtkImageView, is there no other way of image scaling?
Thanks
Gorav
On 02/03/2010 12:02 PM, Dov Grobgeld wrote:
Even if your image has more than eight bits you can always con
Even if your image has more than eight bits you can always convert it to
8-bit according to a user setting defining the grey level max and min to be
used for the convertion (known as window and level in the medical image
community). That's exactly how I do it in my image viewer giv. The image is
he
>> Or are you saying the libraries (gtk/mpfr/stdc) I'm using may be caching
>> the locale and may not heed my changes?
> Since Gtk+ does not have any mechanism to rebuild the UI when a locale
> category changes, either you implement such mechanism or, more often,
> put up with it and accept the loc
On Tue, 2010-02-02 at 17:25 +0530, Gorav wrote:
> Hi
>
>
> I need to do some image manipulation using GTK, and I want to view some
> proprietary image formats. So, I can prepare RGB data. But, which widget
> and API to be use to draw pixels on screen.
>
>
> I used GtkImage using Pixbuf, but i
On Fri, 2010-01-29 at 00:27 -0500, Freddie Unpenstein wrote:
> > Using Python and PyGTK I've got a GtkMenu with various GtkCheckMenuItems
> > in it. When the user clicks one of the checkboxes the menu closes. I'd
> > like for the user to be able to check a series of checkboxes without the
> > menu
On Tue, Feb 02, 2010 at 06:14:18PM +0530, Siddu wrote:
> On Tue, Feb 2, 2010 at 5:56 PM, Pierre Wieser wrote:
>
> > Reading this list, I see some questions which talk about "threads": main
> > thread, event thread, and so on.
> >
> > I was not conscious Gtk+ was multithreaded. I'm conscious of as
Hi all,
I have noticed that there is a way to load an animation using
gdk_pixbuf_animation_new_from_file.
But is there a way to save already loaded/created animation to a file?
For example GdkPixbuf has a method gdk_pixbuf_save
Thanks in advance,
Tomas Soltys
_
On Tue, Feb 2, 2010 at 5:56 PM, Pierre Wieser wrote:
> Hi all,
>
> Reading this list, I see some questions which talk about "threads": main
> thread, event thread, and so on.
>
> I was not conscious Gtk+ was multithreaded. I'm conscious of asynchronous
> code with the mail loop and idle function
Hi all,
Reading this list, I see some questions which talk about "threads": main
thread, event thread, and so on.
I was not conscious Gtk+ was multithreaded. I'm conscious of asynchronous code
with the mail loop and idle function (which are rather in Glib, I believe ?),
but really not of multi
Hi
I need to do some image manipulation using GTK, and I want to view some
proprietary image formats. So, I can prepare RGB data. But, which widget
and API to be use to draw pixels on screen.
I used GtkImage using Pixbuf, but it supports only 8 bits per sample.
Then I used GtkDrawing area,
On 2/2/2010, "David Nečas" wrote:
>On Mon, 1 Feb 2010, Freddie Unpenstein wrote:
>> > On Sun, 31 Jan 2010, james morris wrote:
>> >> Why is store/change/restore of locale bad?
>>
>> > There's nothing at all wrong with it in the context you
>> > specified -- i.e. you want to ensure that floating-
On Tue, Feb 02, 2010 at 09:58:27AM +, james morris wrote:
>
> So what's the point of having a setlocale function which can tell you
> the locale in use and/or set a new locale to use if this stuff is going
> to be stored in cache and read/write of locale settings is going to
> break the librar
On 1/2/2010, "Freddie Unpenstein" wrote:
>> There's nothing at all wrong with it in the context you specified
>> -- i.e. you want to ensure that floating-point values written to
>> and read from file always use '.' as the decimal separator. I do
>> that in my app, gretl (also for reasons of port
On Mon, 1 Feb 2010, Freddie Unpenstein wrote:
> > On Sun, 31 Jan 2010, james morris wrote:
> >> Why is store/change/restore of locale bad?
>
> > There's nothing at all wrong with it in the context you
> > specified -- i.e. you want to ensure that floating-point
> > values written to and read from f
15 matches
Mail list logo