Hi, On Wed, 2008-05-07 at 09:27 +0200, Nicolás Serrano Martínez Santoswrote: > void refresh_preview(GimpPreviewArea *p, GimpDrawable *d){> gint width, height; GimpPixelRgn rgn_input; guchar *buf;> > width = gimp_drawable_width(d->drawable_id);> height = gimp_drawable_height(d->drawable_id);> buf = g_new(guchar,width*height*3);> gimp_pixel_rgn_init (&rgn_input,> d,> 0,0,> width, height,> FALSE, FALSE);> gimp_pixel_rgn_get_rect(&rgn_input,buf,0,0,width,height);> gtk_widget_set_size_request((GtkWidget *) p,width,height);> gimp_preview_area_draw(p,0,0,width,> height,GIMP_RGB_IMAGE,buf,3*width); /* always RGB */> g_free(buf);> } That's a terribly inefficient way to doing things as you are allocatinga large amount of memory here to draw everything in a single callinstead of iterating over the drawable on a tile-by-tile basis (which iswhat GimpDrawablePreview is doing). But it should work. I don't seeanything obviously wrong with this code. Perhaps you can make a simpletest application that we can compile and use to reproduce your problem? Sven _______________________________________________Gimp-developer mailing listGimp-developer@xxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer