At the other end of the spectrum, perhaps I can share some experiences handling image sizing when transforming web pages into (print) books. I see solving the problem as a 2 step process: first figure out the ingredients, then decide how to mix them together.
- the php getimagesize function tells us how big an image is -- essential to working out what to do with it - resize treatment depends on the aspect ratio (width to height -- is the image landscape or portrait) - decide parameters for maxwidth and maxheight - the user probably has to specify optional parameters -- image alt text -- caption text -- centre, float left or float right - the developer has to develop some handling rules -- for landscape images --- the displayed width can't exceed maxwidth --- if it's float left or right, width can't exceed (say) .5 x maxwidth --- if it's centred, width can't exceed (say) .75 x maxwidth -- for portrait images --- the displayed height can't exceed maxheight --- if it's float left or right, width can't exceed (say) .25 x maxwidth --- if it's centred, width can't exceed (say) .5 x maxwidth - the developer can vary how to interpret landscape or portrait; for example, on paper, it seems to work if one interprets portrait as width:height as at least 1:1.4 (square root of 2) Hope this helps JR >> how can I handle automatic resizing of too large images >> in the upload process? > > I know I am a bit too vague, but I see there are many interesting > recipes from Eemeli and Petko (among others) which might be used as a > blueprint for your goal. > DragDropMultiUpload (which I use a lot, thank you Petko!) is a very > good tool to be consideres for inclusion in your project, as well. > > Too naif a suggestion, Hans? > :-) > > Luigi -- John Rankin _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users