I implemented a much improved image scaler for the jpeg picture viewer system. Attached is a file to replace source/utils/jmemsrc.cpp.
The built in power-of-two scaling of libjpeg isn’t used anymore, rather the input image is scaled such that either width is MAX_TEX_WIDTH or height is MAX_TEX_HEIGHT, but neither is greater. The input image will either be scaled up or down.
On a 1600×1200 input image the stairstep effect is Just Plain Awful on the original approach (in my opinion). In that case the image would have been scaled down to 400×300 and then expanded up to the 768×480 display, throwing away a lot of pixel information.
I’ve only got jpeg images I want to view, but the scaler can be incorporated into the other image decoding routines.
Hope this is useful!