[development] DHTML Image Cropper
ber at webschuur.com
Wed May 3 10:35:43 UTC 2006
Op woensdag 3 mei 2006 03:41, schreef Adrian Rossouw:
I have recently developed a small, but EXTREMELY usefull autocropper for a
Rails project. Good news: only four lines of code. Bad news: you need Ruby
apis for it. But I bet there is sime PHP equivalent around. And because it
uses imagemagick, its not hard to write these apis yourself.
But, if you use imagemagick, it is not hard to make this a lot more user
friendly. Because, however cool a DHTML cropper might be: much cooler is to
have the system crop it for you. Nice cropping off course.
Here is what I did (sortof):
1 stretch the contrast a lot. make sure the outer borders are white after this
(i played with teh values a bit)
2 smart crop that image.
3 trow that image away, but remember the offset and crop values.
4 use these values to crop, using crop!
This concept needs finetuning, but vecause I use crop! the first 3 steps
hardly add any value anyway :) I found that at least 90% of the images are
already cropped very well by crop!
Conclusion: It is perfeclty possible to do this without user interaction. And
taking difficult tasks away from users is always the better option that
adding these tasks.
Obviously it could be good to make that DHTML cropper optional. s in: Drupal
will crop the stuff for you correct 90% of the tilmes. And if the last10%
bother you, you can change these by hand.
PGP ber at webschuur.com
PGP berkessels at gmx.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060503/85f86c8f/attachment.pgp
More information about the development