Aspect ratio correction through matrix processing (no OpenGL)

    May 27 2016 | 4:26 pm
    Hi. I need to build thumbnails of images imported through a to a fixed jit.pwindow (1:1 ratio for instance). As the images may differ in aspect ratio from the jit.pwindow, is there an easy solution using matrix processing to generate the thumbnails while keeping its proper aspect ratio and adding horizontal or vertical black bars accordingly?
    I'm not talking about, or manipulation, just straight matrix processing. Has anyone done it before?