GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Apr 24, 2014 11:21 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to scale GdkPixmap
PostPosted: Wed Nov 21, 2007 10:39 am 
Offline

Joined: Wed Nov 21, 2007 10:11 am
Posts: 2
How can I do to scale a GdkPixmap? I'm developing gtk application in c++ and I need to scale an image. I can't use pixbuf because I need to draw on image.
Since now excuse me for some errors in messages but I'm italian and I not speak english very well. ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 4:36 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Maybe use gdk_drawable_get_image() to get the GdkImage and then gdk_pixbuf_get_from_image() to get GdkPixbuf and then gdk_pixbuf_scale() on that? Not sure, but that's my guess.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 5:06 pm 
Offline

Joined: Wed Nov 21, 2007 10:11 am
Posts: 2
:D Tanks for your reply. :( I think that it is slow and I need a good screen refresh. Probably I must create new class based on GdkPixmap and manipulate color bytes to scale image, in this case I need some algorithm to scale image's color matrix.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group