Questions tagged [gdkpixbuf]

93 questions
3
votes
1 answer

Change the colour of pixels in a GdkPixbuf (GTK3)

I'm using Gtk.StatusIcon, and want to change the colour of some pixels; I have a working piece of code, this loads a 1x1 pixel PNG file with the colour I want to set, and then copies that to thhe icon Pixbuf. While this works, it has the obvious…
Martin Tournoij
  • 26,737
  • 24
  • 105
  • 146
3
votes
3 answers

Converting Bitmap to GDK# PixBuff

How can I convert a System.Drawing.Bitmap to GDK# Image so that I can set to the image widget. I have tried this... System.Drawing.Bitmap b = new Bitmap (1, 1); Gdk.Image bmp = new Gdk.Image (b); UPDATE: Bitmap bmp=new Bitmap(50,50); …
techno
  • 6,100
  • 16
  • 86
  • 192
2
votes
1 answer

What is causing this C memory leak? (exited with error 137)

I'm not too sure why my C program is leaking, it has something to do with the set_image_scaled() function I'm pretty sure and it has to do with me resizing an image. Basically once I take a picture with gphoto2, I save that file to a jpg, then I…
username3630
  • 111
  • 1
  • 7
2
votes
3 answers

GTKmm - How to put a pixbuf in a treeview

I'm learning how to use GTKmm and I'm having a really hard time figuring out how to put an image into a treeview. I used Glade to create a treestore with 3 columns, one of which is a GdkPixbuf called store_pixbuf. I also created a treeview in…
bmw357
  • 21
  • 1
  • 2
2
votes
1 answer

How to change the image shown by a GtkImage?

in my program I would like to change an image by clicking a button but I can not find the function class TestGdkPixbuf(Gtk.Window): Cover= "image.png" Cover2= "image2.png" def __init__(self): Gtk.Window.__init__(self,…
Vianney Bailleux
  • 373
  • 2
  • 7
  • 15
2
votes
1 answer

How to resize an Image to window size in Vala

I am trying to create a small application which displays an Image that you selected in a File chooser. It should then resize when the user resizes the window. My app works up to the point where I add this code to the constructor of my class which…
ben
  • 49
  • 5
2
votes
1 answer

Load image from base64 encoded image in Gtk3+

The main problem is that, from what I could find, there is no easy/documented way to load an image from base64 encoded image. I use the following code to encode the image to base64 (so that I wouldn't need to include all the images with the source,…
UsManyDead
  • 25
  • 5
2
votes
2 answers

Memory leak in gdk_pixbuf_new_from_file()

Valgrind reports a memory leak when I run this simple test program: #include int main() { GdkPixbuf* buf; GError* err = NULL; buf = gdk_pixbuf_new_from_file("test.jpg", &err); g_assert_no_error(err); …
faken
  • 6,572
  • 4
  • 27
  • 28
2
votes
1 answer

How to render text on a GdkPixbuf.Pixbuf

I'm trying to add text to a Pixbuf, using Python and Gdk 3. I've been searching the web for info about this topic for hours, and it looks like I'll need to create a cairo context from the pixbuf. Unfortunately, I have zero experience with cairo, but…
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
2
votes
1 answer

Why is the deprecated "rsvg_pixbuf_from_file_at_size" faster/more efficient that the non-deprecated method (Cairo)?

I'm using C# and P/Invoke to access the GDK libraries. My goal is to convert an set of SVG files into raster images (specifically, png), and using the GDK libraries seems to be the most reliable/accurate. After doing some reading of the Gnome/Cairo…
2
votes
1 answer

How can I use P/Invoke to call a 64-bit C++ DLL from a 64-bit C# Application?

I'm working on some code that involves using P/Invoke to call unmanaged functions from a few C++ DLLs. I'd like to be able to build the application as either 32 or 64 bit. Currently, it only works as x86. I have 32 and 64 bit copies of each of the…
2
votes
1 answer

What is a GTK "render detail"?

I was having temporary difficulties setting the icon of a window in my C program to a stock icon, and I almost asked how to do it, but then I created the GdkPixbuf I needed like…
Wutaz
  • 362
  • 3
  • 19
1
vote
1 answer

Creating a highlight effect with the cairo library

I have a cairo_t cr which I can draw upon with cairo. I want to try to create a highlighting effect on this cairo graphic that should do one of the things: Lighten up the whole image so it looks a little brighter Change the background, that is the…
lanoxx
  • 12,249
  • 13
  • 87
  • 142
1
vote
2 answers

looking inside a GdkPixbuf structure with ddd or gdb

i would like to look inside of a GdkPixbuf structure for debugging purposes. but all i get is a message. ill show you a little snippet of example code. //load image GtkWidget *image = gtk_image_new_from_file("image.bmp"); //get…
maxim
  • 167
  • 1
  • 7
1
vote
0 answers

How do I get the Gtk Pixbuf icon to show?

The hearham.live RepeaterSTART application no longer has an app icon in the Alt+tab switcher on Ubuntu... or the app switcher on Librem phone. Now I recall this had been working and I am wondering why this piece of code doesn't seem to work…
NoBugs
  • 9,310
  • 13
  • 80
  • 146