Needs work
Project:
Imagefield Crop
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jan 2010 at 13:04 UTC
Updated:
25 Jul 2013 at 14:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
very_random_man commentedI also think the ability to define multiple crops would be useful.
For example, if you want to specify a crop of the original image for node display and a separate crop for the teaser thumbnail.
Sometimes a smaller version of the same image isn't useful as a thumb and wont please the marketing or design chaps. ;-)
Comment #2
btopro commentedYeah, I think this'll get cleaned up in D7 thanks to the file api but for 6 i think if there was almost a separate version generated as an imagecache name space (if enabled) it could do it. Im sure it's much harder then that but just +1ing this idea :)
Very cool module either way.
Comment #3
naero commentedSubscribe
Comment #4
grzegorz.bartman commentedSubscribe
Comment #5
gooddesignusa commentedSubscribe.... only reason i never used this module. Wish it had this feature from the start :(
Comment #6
mandclu commentedSubscribe, and +1 for the ability to crop to different formats based on imagecache presets.
Comment #7
grzegorz.bartman commentedI'm working on module imagefield_multicrop. It allow to make separate crops for different presets.
More info in README.txt
Comment #8
espenmoe commentedHave you created a project page?
Comment #9
yhager commented@grzegorz.bartman, a separate module will just duplicate the effort. I think it would be better to deploy that as patch to this module.
Comment #10
espenmoe commented@grzegorz.bartman can this be done?
Comment #11
grzegorz.bartman commented@espenmoe not yet, but i will create project page for this module, maybe in this week
@yhager i didn't find easy way to make patch for imagefield_crop so i created new module
in attachment next version
Comment #12
yhager commented@grzegorz.bartman if you want to share the problems, we can work together. Duplication is good only when absolutely necessary.
Comment #13
phl3tch commentedIt'd be great if you could fuse this project with imagefield_crop. Subscribing.
Comment #14
m_z commentedSubscribing.
Comment #15
naero commented@grzegorz.bartman ... I'd have to agree with CrackWilding ... why would you want to create a separate project for this feature? Instead, wouldn't it be most efficient to incorporate your code into the Imagefield Crop module?
Comment #16
johnpitcairn commentedsubscribing
Comment #17
dimiduj commentedsubscribing
Comment #18
m_z commentedWhat about using http://drupal.org/project/epsacrop for this job? (At the project page you can find a link to a nice demo page.)
Does anybody has an idea, if ImageField Crop can be used together with EPSA Crop?
Comment #20
timezero commentedI tried ImageField Crop together with ESPA Crop, but it did not work out well for me.
Comment #21
timezero commentedDoes this alter Image cache in anyway? I found that I can not add any actions to most of my Image cache presets after installing this.
Edit: That was caused by another module, sorry!
Anyhow, great module. It the closet to what I am looking for. I would be looking for a module that can:
1. Crop an image according to several Image cache presets
2. Preserve the cropping box with a min-width and min-height
missing would be,
3. Be able to crop an image according to a set width but let the height be realizable by the crop box (or vice-verse)
4. Resize the crop box (preserving the ratio) to fit the image, if the image is smaller than the dimensions of the cropping box.
5. Be able to resize the image after cropping
Comment #22
anrikun commentedYou may try the new module ImageField Focus
http://drupal.org/project/imagefield_focus
Comment #23
mxtSubscribe
Comment #24
Barfly commentedsuscribe
Comment #25
Brandonian commentedSubscribing and offering services.
I've started playing with some code to get this working on the D7 branch, and it really looks like a lot of the underlying code is probably going to need to be refactored in ordered to get this working. In order to handle the multiple instances of styles (especially during flushes and whatnot), we'll need to store that info in the database. This will also have the added benefit of putting the module more inline with how other effects are handled in D7 (i.e., not saving the file multiple times during the course of image generation). This is similar to how imagecrop handles their multiple selections, and probably the way to go.
My basic roadmap at this point looks like this. Comments/suggestions welcome.
- Add db support for saving image cropping data
- Swap out effect code to incorporate saved info
- Add interface for image effect to define default crop (if no js crop is defined)
- Potentially swap out widget? Imagecrop currently piggybacks on the managed file widget in D7, and while I personally think this works well, I'd love to discuss this further.
I'm still getting use to git, but I'm hoping to get a sandbox going here in the next day or two with some working code. I'll update once I'm further along.
Comment #26
Brandonian commentedFYI, the sandbox is up and running at http://drupal.org/sandbox/brandonian/1112418.
Comment #27
Brandonian commentedHere's an initial patch for allowing multiple crops. It's a continuation of what I started building in the sandbox (http://drupal.org/sandbox/brandonian/1112418), but I wanted to get something here for people to look at.
Although I've left code for the widget from the previous version, the real action happens with extending the image widget from core. Currently, there's no upgrade path, although I'm not sure that's within the scope of this patch.
There are still a few missing pieces here, but it's functional. The main thing that comes to mind is that I need to re-implement the inline preview for the widget.
Comment #28
helenrae commentedSubscribing...
Comment #29
Brandonian commentedReroll of the patch, with some bug fixes included. There are some features that could/should be added to this, but I'm going ahead and marking this as needs review in order to get more eyes on it. We're currently using this version of the module on our company web site and seems to work as advertised, and I'd really like to be able to see if we can get this functionality added the module proper.
Comment #30
yhager commentedThanks for this. It looks interesting - I was unaware of the effect hooks. I will need to look into this more thoroughly before deciding this is the way to go. Till then, I can open a branch with this patch committed, if you like. Maybe this will ease other people in testing this functionality and possibly help out.
Comment #31
Brandonian commentedNo problem. I'm all for another branch, especially since I'm sure there's plenty of polish/general work that could be done before a complete merge. Off the top of my head, there isn't an upgrade path ATM, nor did I fully implement the cropping widget (the preview is missing), plus a dozen or so other little ideas.
Feel free to contact me if you have any questions about the patch. If you're interested, I'd be willing to help co-maintain to get this functionality in.
Comment #32
yhager commentedOk, great!
I have created a branch named "image-effect-685676", and gave you commit permissions.
I was unable to use the patch in #29, cause it did not apply cleanly to latest 7.x-1.x.
Please reroll, or commit the patch yourself to that branch.
Thanks for your help on this!
Comment #33
Brandonian commentedChanges committed to branch image-effect-685676. I'll keep this ticket open until we merge back into the main branch, but plan on seeing other tickets opened up to finish up the work started here.
Comment #34
betovargSubscribing. Waiting to see if a D6 option comes up. Trying Imagefield Focus this moment.
Comment #35
karljohann commentedSubscribe
Comment #36
bryancasler commentedsubscribe
Comment #37
brightboldSad that this hasn't progressed in the last couple of years. This is great functionality for sites working with structured content - as people earlier in the thread have suggested, to have one crop that would be used on a node page, a second for a teaser view, and a third for a grid view, for instance.