Cropping with ImageGen? Options
drobar
Posted: Friday, February 09, 2007 2:23:23 AM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,831
Location: MA, USA
A number of people have asked about cropping images with ImageGen. I've never thought it a good idea but Mark and Casey both point out that it could be a useful feature, even if cropping of the central portion of an image were all that were accomplished.

You've either wanted to do cropping with ImageGen or else have clients that want it. Please share your thoughts and advice on how this might be handled. Let's talk and come up with a great solution that doesn't require a user interface, just ImageGen and querystring parameters like it is now (with some new parameters, undoubtedly).

Here's a quiz to get your minds going. Using the existing ImageGen parameters (width, height, pad, constrain, etc), provide the appropriate querystring for accomplishing each of the following? Make up any new parameters you think ImageGen will need. I have an idea for how to do this but want to get your suggestions so we can have the best solution!

Starting with 800x600 photo called photo.jpg...

* Crop to 200x200 image, taken from the very center of the original image.

* Crop to the maximum sized square, showing center of the image
(results in 600x600, in this example).

* Crop to a square as above, then resize to 200x200

* Crop landscape image (800x600) into a portrait orientation with:
- the same proportions as the original (450x600)
- an arbitrary ratio (say, 1:2)
- a specified height and width (say, 100x600)


Are there any other scenarios you'd want to handle? Maybe cropping to save one edge, rather than the exact middle?


Thanks for all your thoughts and suggestions!
doug.



MVP 2007-2009 - Percipient Studios
bootnumlock
Posted: Friday, February 09, 2007 3:35:36 AM

Rank: Fanatic

Joined: 10/9/2006
Posts: 460
Location: batavia, IL
could you just expand the parameters to include a cropW, cropH, and startCord???


&cropH=200&cropW=300&startCord=50,100

of course error checking would be a bit of a drag... but i guess you could get the imageW and imageH and just show Hello World on error or perhaps some clever imageGen red X of sorts...

am i talkin' crazy talk?

bootnumlock - aka bob baty-barr
My Packages Site: http://packages.maliciousthinktank.com
Business Blog: http://www.maliciousthinktank.com/blog
Personal site: http://www.baty-barr.com
Level 1 Certified!
bootnumlock
Posted: Friday, February 09, 2007 3:37:18 AM

Rank: Fanatic

Joined: 10/9/2006
Posts: 460
Location: batavia, IL
okay... wait....

i just answered that question from my perspective, as a developer of sorts. A client placing an image or uploading an image really won't have access to the imageGen syntax.

hmmmmm, this got a bit more complex from where i am sitting.

bootnumlock - aka bob baty-barr
My Packages Site: http://packages.maliciousthinktank.com
Business Blog: http://www.maliciousthinktank.com/blog
Personal site: http://www.baty-barr.com
Level 1 Certified!
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.