Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Is there any way to have Imagecache actions work the result of an Imagefield Crop? I was hoping to be able to be able to added rounded corners to the scaled down version...
Anyone have any ideas?
Great module by the way!
Comment | File | Size | Author |
---|---|---|---|
#29 | imagefield_crop_uncrop_cache.patch | 6.81 KB | mandclu |
#7 | imagefield_crop_426892_7.diff | 5.99 KB | q0rban |
Comments
Comment #1
johnmunro CreditAttribution: johnmunro commentedThis works fine just as it should. See here for an example http://www.dsty.jp/schule/news/christian-wulff-besucht-die-dsty
Is it going wrong for you or are you just not sure how to do it? If the latter, make sure you are setting the "Display Fields" properties tab in the content type.
Comment #2
patcon CreditAttribution: patcon commentedThanks very much john! I did end up figuring it out afterwards, although after the fact, I realized it would be nice to be able to manipulate the full imagefield_crop image with imagecache as opposed to just the cropped version. That way, imagefield_crop could be used to focus on an area of interest, and imagecache could manipulate the full image for other uses. For example, in field display settings (when editing content types), there's be two options to select for each imagecache preset --
_full and _crop. Unless this already exists and I'm getting ahead of myself again! :)Comment #3
johnmunro CreditAttribution: johnmunro commentedPatrick, does my change in the title of this issue match what you are thinking?
Comment #4
patcon CreditAttribution: patcon commentedYeah, perfect John! That's MUCH more concise...
Comment #5
mason@thecodingdesigner.com CreditAttribution: mason@thecodingdesigner.com commentedsubscribe. It would be nice if to be able to apply imagecache to both or either the cropped and uncropped versions
Comment #6
q0rban CreditAttribution: q0rban commentedsubscribe. This would be really nice for modal image views. You can have the cropped version of the photo zoom to the full image size.
Comment #7
q0rban CreditAttribution: q0rban commentedAttached patch adds uncropped formatters for each imagecache preset. Might be nice to add an admin interface to enable this functionality, as it definitely murks up your UI if you have lots of IC presets.
Comment #8
cels CreditAttribution: cels commentedReview the patch: works for imagecache.
The ".crop_display.jpg" it's a little bit weird filename, but it's works with imagecache profiles. Is possible to change the filename? By example, add a prefix instead the suffix.
Note, it's "quick&dirty" example:
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch works great for me, this is a really awesome addition, avoiding to create multi imagefields.
Thanks ! Can't wait to have this in next release !!
Comment #10
Bilmar CreditAttribution: Bilmar commentedsubscribing
Comment #11
jacktonkin CreditAttribution: jacktonkin commentedPatch #7 still applies to 1.0-rc1 and works as expected. This is a key feature for me too.
Some notes:
1. The filenames for uncropped images are a little odd (as noted in #8). Also, I uploaded a test.gif and got test.gif.crop_display.jpg (the image is actually a gif, not a jpeg). Could be a bug for another issue though, because it probably affects all crop_display images.
2. There is a todo in this patch that is copied from the imagecache module.
3. The formatters are added to all filefields no matter which widget is selected - this is the same behaviour as imagecache, so there may not be a way to fix this with the current APIs.
Would really like to see this (or similar functionality) in 1.0!
Comment #12
vinmassaro CreditAttribution: vinmassaro commentedThanks all for the patch. One issue I am having is when using Imagefield Crop with the Dynamic Display Block module. I have Imagefield Crop set to put all images in a directory, and DDBlock to look in that directory to create a slideshow out of the images. The problem I am having after applying this patch is that the cropped versions get placed in the same directory, so I am getting duplicate photos. Is there a way around this? I tried to uninstall the module and install the unpatched 6.x version, but the database updates that we made by this patch are not uninstalled/reversed. How can I revert back to the core Imagefield Crop installation/database schema? Thanks!
Comment #13
q0rban CreditAttribution: q0rban commentedHi vinmassaro! I'm pretty sure imagefield_crop has those images in the same directory by default. It has nothing to do with this patch. You might create a separate feature request that imagefield crop use separate directories for the cropped and uncropped images.
Comment #14
vinmassaro CreditAttribution: vinmassaro commentedThanks for the info. In the meantime, reversing the patch did not remove the database updates, so when I upload an image, two version are still created. Any way to clear that all out and start fresh? Imagefield Crop doesn't have an uninstall option. Thanks!
Comment #15
smithn.nc CreditAttribution: smithn.nc commentedSubscribe.
Comment #16
q0rban CreditAttribution: q0rban commentedClarifying the title: this is about imagecache. For a generic image formatter that displays the full image, see #240849: Add an option to display the original image .
Comment #17
iamer CreditAttribution: iamer commentedI am using the patch in #7 and it is working great.
Then I wanted to integrate lightbox so that when a user clicks on an "uncropped" variant of an image it displays a bigger version in a lightbox. However the lightbox imagecache presets don't pick up any "uncropped" variants. I tried fixing it in different ways, but nothing worked.
It would be great if someone pointed me in the correct direction.
Thanks.
Comment #18
q0rban CreditAttribution: q0rban commented@iamer, I think you'd need to open a feature request in lightbox to add support for this patch, which I'm doubting they'll do until this patch is actually committed.
Currently I use highslide to achieve the same end you are talking about. You have to create the formatter by hand in highslide, however.
Comment #19
iamer CreditAttribution: iamer commentedThanks for the pointer to highslide, it is exactly what I needed. Very slick! Good thing I am not doing anything "commercial", yet.
Comment #20
shiva7663 CreditAttribution: shiva7663 commentedIs this the issue that, if resolved, would allow one to show your original or preview images, and have Imagefield Crop be in charge of making the thumbnail that is associated with the main image (instead of replacing it)?
Comment #21
patcon CreditAttribution: patcon commentedYou got it shiva :)
Part of the idea is to allow imagecache to work on either one
Comment #22
silkogelman CreditAttribution: silkogelman commentedi agree with #7 q0rban that adding formatters could murk up UI.
A possible solution may be instead of adding formatters to add imagefield_crop as actions for imagecache presets.
That way one could use imagefield_crop as an area selection tool, and add other actions to a preset if desired for use in views or lightboxes.
Possible actions could be: 'crop + resize' (as now is standard with imagefield_crop)
and 'crop only' ("regular" cropping, the result is a crop with the highest possible resolution available from the original image)
Comment #23
suedehead CreditAttribution: suedehead commentedSubscribe.
Comment #24
sholn CreditAttribution: sholn commentedHello,
I found an issue on the patch, it happens that images that does not need to be cropped does not have their uncropped file, at least for me does not work.
I've fixed that problem add file_exists check to the if condition:
Comment #25
q0rban CreditAttribution: q0rban commentedAh, I was wondering why that happened to me the other day! Thanks for tracking that down.. :)
Comment #26
q0rban CreditAttribution: q0rban commentedActually, I don't think this is a bug with the patch, though, looks like it's a pre-existing bug with imagefield_crop.
Comment #27
sholn CreditAttribution: sholn commentedMaybe, but you don't notice that because it makes a crop with jquery :)
Comment #28
mandclu CreditAttribution: mandclu commentedSubscribe, and +1 for this.
Comment #29
mandclu CreditAttribution: mandclu commentedOh, and a new patch incorporating the fix from #24 is attached
Comment #30
kloewer CreditAttribution: kloewer commented#29 works fine, what about integration with Lightbox2?
Comment #31
q0rban CreditAttribution: q0rban commentedAs far as I can tell, the issue mentioned in #24 and added to the patch in #29 is actually a separate bug with imagefield_crop that should be filed in a separate issue and patch. I imagine the patch in #7 is still the one that should be committed. I'm going to go ahead and mark this as RTBC, since #8, #9, #11 & #17 all have tested the patch.
Comment #32
pragna CreditAttribution: pragna commentedI Found following error after implementing patch.
I used => Drupal 6.15 ,
=> Image crop 6.x-1.0-rc2
=> ImageField 6.x-3.2
=> 6.x-2.0-beta8
Fatal error: Call to undefined function theme_imagecache_formatter_default().
Please help me..... I have urgent task.
Thanks In Advance.
Comment #33
danoprey CreditAttribution: danoprey commented#7 worked well for me, although I would have liked a 'X image (cropped) linked to image (uncropped)' version, but I'm asking too much.
Comment #34
vikramy CreditAttribution: vikramy commentedSubscribing
Comment #35
GAMe CreditAttribution: GAMe commentedI too think this would be a massive improvement to what is already a great module. I am currently trying to come to a good solution to this myself.
Comment #36
dlnsk CreditAttribution: dlnsk commentedI added integration with Lightbox2. It's allow any variants of using uncropped files (as source or destination or both).
See patch for ligthbox2 here: http://drupal.org/node/1405354
Comment #38
ram4nd CreditAttribution: ram4nd as a volunteer commented