dahlia / sqlalchemy-imageattach

SQLAlchemy extension for attaching images to entities.
https://sqlalchemy-imageattach.readthedocs.io/
MIT License
116 stars 25 forks source link

Generate thumbnail using seam carving. #12

Closed Hardtack closed 11 years ago

Hardtack commented 11 years ago

Since SQLAlchemy-ImageAttach uses wand. We can generate thumbnail using seam carving. But it seems that there's no API to use it.

dahlia commented 11 years ago

Seam carving is meaningful only when images need to lose their aspect ratio. SQLAlchemy-ImageAttach always maintains images’ aspect ratio, and it even doesn’t provide any options to transform aspect ratio e.g. crop yet. That’s why generate_thumbnail() exclusively takes only one of width or height at a time.

If we make it to deal with crop, seam carving, or such transformations, we have to add more fields than it currently does, to distinguish images of the same size with different windows e.g.:

Any ideas?

Hardtack commented 11 years ago

I misunderstood the purpose of generate_thumbnail. Thanks,