Discuss: Automatic Magazine Layout
by Harvey Kane
- Editorial Comments
2 Nice article
I think your article is very interesting and useful. What do you think about an idea to speed things up by allowing to manualy enter values for image size?
posted at 08:15 am on July 11, 2006 by Boris Kuzmic
3 Interesting Concept
This is a good idea and its nice to see the integration of math and webdesign. However, I think the idea can be taken alot further. How about specifying both the maximum width and height and also images which are given a greater “real estate” preference. How about different layouts like larger photo on left, top etc. Even a option make a polaroid photo-montage a-la Picassa would make this script alot more useful. Also an easy way to mabye refrence the pictures in the footnotes would be interesting (i.e. overlaying a figure number on the image).
I would be interested in a RoR version for this, if only I had the time at the moment. But again, well done on the novel and useful idea.
posted at 12:01 pm on July 11, 2006 by Chris Lloyd
4 Untitled
I’d like to have this script integrated into the gallery extension of Typo3. The preview page looks really ugly when you combine landscape and portrait pictures.
posted at 02:03 pm on July 11, 2006 by Andreas Berg
5 Memory issues?
On the issue of using getimagesize, you may be able to use imagesx and imagesy to get the width and height of the images. They work a little different than getimagesize, whereas getimagesize takes a filename while imagesx & imagesy take an image resource. This may be worth checking in to though, as getimagesize is currently providing your script with information that is not being used.
More information can be found at getimagesize , imagesx, and imagesy .
posted at 02:22 pm on July 11, 2006 by Jared Wein
6 Useful Tool
It’s an elegant solution, as mentioned before, and it can be taken further. I’m thinking some interesting plugins for WordPress/TextPattern/etc could be based off of this.
posted at 08:19 pm on July 11, 2006 by Damien Wilson
7 Feedback
Thanks everyone for the feedback. Yes, there are plenty of ways to improve this, and a Wordpress / Typo plugin seemed logical to me, as well as adding support for alt / title attributes on the images.
The speed of getImageSize() hadn’t worried me too much as benchmarking didn’t show too much of a performance hit (compared with my first attempt at least). I’ll certainly look into getting the data from the image resource if this saves some processing power.
It currently tries to use the highest resolution image as the large one, but an obvious enhancement would be to add an extra flag for priority on each image.
I guess the whole point of the script for me is to deal with user uploaded images, or images that change often – The script works very well for a homepage rotation, where 3 random images are chosen randomly and arranged nicely.
I also use the script in my CMS – users can add a simple piece of custom BBCode into their pages – this is the sort of thing I can see working for Wordpress, which I’ll be getting started on soon.
posted at 09:27 pm on July 11, 2006 by Harvey Kane
8 Wow.
Very nicely done. Take a good note folks–Leonardo da Vinci would be proud. The best designs take into account so many different disciplines. This is a superb integration of relatively complex algebra and visual design to fulfill a very practical design application.
posted at 10:12 pm on July 11, 2006 by Brian Cray
9 why use html
Good stuff. Great math :-)
But why not skip the whole html/css bit and generate the compilation in one single jpeg image.
This way one eliminates a few HTTP requests, the jpeg-file overhead. The html will also be smaller and one doesn’t need to call getImageSize. Also no browser-bug to take into account. The only problem whould be the color of the padding.
posted at 03:48 pm on July 12, 2006 by Gerben de Keijzer
10 So nice
It’s really an intresting reading.
I will try to do it. Thanks!
posted at 08:17 pm on July 12, 2006 by Yang Kang
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)



1 Timing is everything
I find it truly incredible that no sooner do I run into the challenge of “I know I want to put a small image gallery on the home page to improve it, but I don’t have the time (or want to go through the pain, yet again) of having to manually size the images to exactly the size they need to be to get them into an aesthetically pleasing layout” then ALA rises to the occasion and delivers what appears to be an elegant solution to exactly my problem. Just think…in a day or two, when I get to use this, I’ll get my problem solved sooner than I had expected.
Thank you.
posted at 05:51 am on July 11, 2006 by Bob Monsour