Re: [fltk.general] how to improve image draw speed in fltk1.3
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
Re: [fltk.general] how to improve image draw speed in fltk1.3
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. Dear Greg, I found that it related to the image format, if I use jpeg, it will not has such slow issue, but if the picture is png, the speed is slower. Best regards, Leo ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] how to improve image draw speed in fltk1.3
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. Dear Greg, I found that it related to the image format, if I use jpeg, it will not has such slow issue, but if the picture is png, the speed is slower. Best regards, Leo additional information, the png has transparent effect will let the speed slower, if the png has no transparent effect, the speed is fast. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] how to improve image draw speed in fltk1.3
additional information, the png has transparent effect will let the speed slower, if the png has no transparent effect, the speed is fast. Transparency probably requires that the image be composited. Compositing is expensive and slow on most graphics hardware, so if your graphics hardware is not of the best, this will exagerate the problem. If you can use images with no transparency, and therefore less need for compositing, things should be a bit quicker SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England Wales. Company no. 02426132 This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
[fltk.general] how to improve image draw speed in fltk1.3
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? Best regards, Leo ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk