> I put up a screenshot here > > http://www3.telus.net/public/robark/Fl_TeacherTool/images/comparison.bmp > > The left two images are the resize and resample from your code and the > top right is jpgtn and bottom right is ImageMagick convert. > > As you can see ImageMagick took about 0.9s and jpgtn took 0.5s while > your resample solution is *probably* orders of magnitude faster. ( On > my P3 900Mhz box) > > The original image was 1024x768 resized down to 300x225. Your code did > make an improvement but I still think ImageMagick looks the best (Not > sure if the screenshot and subsequent bmp lost some quality). > However, what I need to consider is if a classroom has 30 students > meaning 30 resizes, will that be an acceptable wait time. BTW > vncsnapshot takes about 1.5s (on my box) to grab the full size image, > so that's more expensive than the resize. However, LTSP servers are a > lot faster than my little P3. I will have to test it out with my > school dual Xeon server and 30 clients. > Robert,
Just a thought... If speed is a big concern, then you could render the image into an OpenGL widget as a single textured quad, taking advantage of hardware acceleration to do the resampling for you. The quality would probably be the same as the linear resample, and the code to manage setting up the texture would be fiddly, but I expect the speed would be remarkable. The ImageMagick output does look noticeably smoother, I am not sure what method it uses... possibly bi-cubic as opposed to bi-linear, which does require some initial setup for cubic splines, and would be a bit slower. But this could be sped up for successive resamples by retaining the spline info. I also expect that quality could be improved by doing a colorspace conversion (eg. HLS), however that would make interpolation trickier (eg. in the case of hue), and would also add to the computation time. Ramble done now, cheers, Don. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

