/ Published in: Python
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 import gtk import Image def pixbuf2Image(pb): width,height = pb.get_width(),pb.get_height() return Image.fromstring("RGB",(width,height),pb.get_pixels() ) pb = gtk.gdk.pixbuf_new_from_file( "p20050424_160333.jpg" ) im = pixbuf2Image(pb) im.save("welldone.jpg", "JPEG",quality=80)
Comments
                    Subscribe to comments
                
                