On 12.03.2008, at 07:06, pushparaj muthu wrote: > Reading image content of box by using fl_read_image and displaying > image content to another box by using fl_draw image are perfect > > (If both boxes width and height are same.) > > But the width and height of another box is different it image is not > displaying properly > > How to display image perfect if box size is different
Apart from the fact that reading the pixels from the screen is rarely a good idea unless you want to print a screen dump, yes, you can scale images in FLTK. First, read the binary data with fl_read_image Then create an Fl_RGBIMage from that data: <http://www.fltk.org/documentation.php/doc-1.1/Fl_RGB_Image.html#Fl_RGB_Image.Fl_RGB_Image > Then create a new image by sclaing the old one: <http://www.fltk.org/documentation.php/doc-1.1/Fl_Image.html#Fl_Image.copy > And finally render the imag to screen. You can do that really easily by calling the image() function for your widget. FTK will then do all the rendering for you. fl_draw_image is OK too, but it is relatively time consuming. Matthias ---- http://robowerk.com/ _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

