On 05/21/12 19:27, leowang wrote: > Dear All, > I found that the fltk draw image speed is not fast, for example, I have a > 1280*800 window which has a 1280*800 png file as it's background, it will > takes about 2 second to display it in my arm board, the CPU is 800MHz, my > compile tools is amr-linux-gcc-4.3.2, I have break down the time, found that > the most of time spend is not in the decoding but in the draw function, why > memory copy from one buffer to another buffer will take so much time?
Have you ruled out the hardware being slow? A fast cpu but slow graphics might be the issue. Do you have any (non-fltk) programs that can display images quickly on your hardware? For instance, will a large gif playback quickly in a web browser? Or do movies (avi, mp4) play quickly? Try these FLTK programs to see if they're also slow. 1) http://seriss.com/people/erco/fltk/#Animate This uses image() to apply images to a box to do animation. 2) http://seriss.com/people/erco/fltk/#FlDrawImage This uses fl_draw_image(). 3) If openGL is an option, try glDrawPixels(). You may need to experiment with different pixel formats of your image in memory, so that opengl doesn't have to translate your in-memory pixel format into something the hardware prefers. Try to find out what your graphics hardware prefers image data to be in, ie. RGB, RGBA, ABGR, etc. A common problem with extreme slowness in image playback usually means somewhere along the line, each pixel is having to be changed from one format (eg. RGB) to another (BGR) which can slow things down. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk