I am currently using an inhouse HTML slide-show program originally
designed to read jpg pictures in a landscape format from a file folder
and to display them in 3 different fixed sizes (small, medium and
large). This personal program has several educational features that
fit my children needs better than commercially available slide-show
software.
The only problem is when the pictures are either cropped or taken in
portait format, distortion occurs to fully fit both the fixed height
and width specified in each format (small, medium and large). Photos
not captured in a landscape mode are frequently badly streched
horizontally.
I am only seeking a script (Java or other) to read any size pictures
from a folder, dynamically calculate the output dimensions and display
the result while maintaining picture-integrity ratios. Note that the
available display space is in landscape mode to fit laptop screens.
Thus pictures in portrait mode would fit the height, but use less than
the available width. Likewise, cropped pictures with odd sizes would
be adjusted accordingly to retain integrity ratio.
Please specify open-source scripts or freeware I may embed into the
program. Alternatively, you are also most welcome to provide the
source routine, if you have one.
Your assistance is highly appreciated as I have two primary school
children waiting to show their summer holiday projects to their
friends and classmates. |