I make a lot of grid-based sites and needed a way to resize images to snap to a horizontal and vertical grid. For example I can set an action scaling an image to, say, 250px wide, but the height of that image might be any value. This module let's me crop or size the height to the nearest position on my horizontal grid. So If I have an acceptable horizontal position every 20px, I know my images will all fit perfectly on the grid and still remain true or nearly true to their original proportions.

There's also an action for shaving x pixels off once it's resized to allow room for css borders and backgrounds while still keeping the image's position on the grid intact. I've found these very useful in my theming.

So my question is do you think this should be included in your module or submitted as it's own separate module? I'm on the fence myself. Your's is more focused on effects, overlays, and rotation (awesome, BTW) and mine is about precision sizing. It might be good to keep the feature sets separate, but I'm wary of too much splintering in terms of how many modules are our there to manipulate images.

Anyway. Check out the module and let me know what you think.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dman’s picture

Sounds fascinating. Could be a bit of a special case, and it will probably be most useful when used with special CSS also.
Have you seen this automatic magazine layout algorithm ? That was an interesting set of maths to assist image layouts.
And for heavy math, maybe one day we can get content aware image resizing :-}

Anyway...
I don't quite see the application for this gridactions effect myself (I prefer fluid, proportional scaling to grids myself) - but the imagecache_actions project is open for contributions, and the effects are just optional mini-modules within the package, so I don't mind adding this to the group. I don't want to see more mini-modules sprout up when we could get more eyes on shared code in one place.
I'm unable to review the code at the moment (travel) but I'll see if we can roll it in some time. If the code looks tidy enough I'll add you to CVS.

mason@thecodingdesigner.com’s picture

Very cool. Thanks. Let me know when you get to view the code.

I actually use that magazine layout algorithm on my site (http://www.canarypromo.com). It's not Drupal yet, but it will be before drupalcon if all goes well. I think someone wrote a Drupal 5 module to implement that technique, but I think we might begoing another route on the next version of our site.

Anonymous’s picture

Thank you! It is a wonderful action.

fietserwin’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

D6 EOL. This module's D6 issues already haven't received any attention for over a year. Closing them all unconditionally now.