Closed (fixed)
Project:
ImageCache Actions
Version:
6.x-1.6
Component:
Canvas Actions Module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2009 at 14:28 UTC
Updated:
26 Aug 2010 at 12:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
ptitb commentedJust a clearer title.
Comment #2
dman commentedI can't imagine how being called from an aspect switcher would be affecting the behaviour of the sub-actions. They should be entirely modular.
It may be possible for the size of the image to become incorrect sometimes (under imagemagick) and that may produce what looks like an incorrect result, but really, the fact that a sub-preset is being called from an aspect-switching context should NOT make any difference to the way the keywords are parsed!
Are you sure the sub-actions are working correctly outside of the switcher?
Can you post a few screenshots of the settings pages?
Comment #3
ptitb commentedThat was what I was thinking. The sub-actions work great outside the switcher.
But I got a workaround right now. I'm only using the scale action in the sub-action and then crop in the aspect-switcher.
This works like expected and does the job for me!
I attached an image that shows the problem when I'm using a crop in the sub-action.
Comment #4
andrewtf commentedI'm experiencing the exact same problem. It's odd that the sub-actions work fine on their own but then get messed up when used in the aspect switcher. It seems the alignment of the cropped image is always set to top left despite what it's supposed to be in the ImageCache action.
I can post screenshots if need be, but the problem is identical as that described above.
Comment #5
ball.in.th commentedHi,
I think I just ran into the same problem - sub-actions work fine but the switcher doesn't. One of my sub-action also has a crop.
preset 340x340hor
Scale And Crop 340x340
http://ball.in.th/sites/default/files/imagecache/340x340hor/imagecache_s...
preset 340x340ver
Crop width: 100%, height: 80%, xoffset: center, yoffset: top
Scale And Crop 340x340
http://ball.in.th/sites/default/files/imagecache/340x340ver/imagecache_s...
preset 340x340
Aspect switcher: Portrait size: 340x340ver. Landscape size: 340x340hor
http://ball.in.th/sites/default/files/imagecache/340x340/imagecache_samp...
In this case, the result should be the same as http://ball.in.th/sites/default/files/imagecache/340x340ver/imagecache_s... , but it's not.
Comment #6
ball.in.th commentedComment #7
sp3boy commentedI have just installed this module (6.x-1.7) and am also finding that the 100% width in my crop actions of the sub-presets are being processed as 100px.
Comment #8
sp3boy commentedI think the problem is that canvasactions_aspect_image() in canvasactions.inc is described as using functionality from imagecache_build_derivative() but it omits some all-important logic around... percentage expressions.
The attached patch inserts that logic - copied straight from imagecache_build_derivative().
The patch was built against 6.x-1.dev but 6.x-2.dev has the same issue I believe.
Comment #9
dman commentedIf all that is necessary, that's a worry.
I'd have thought that _imagecache_apply_action() would do its own command parsing inside the action.
That's a problem with the imagecache process structure then, really.
If this really is the required fix, it may explain another odd side effect we've seen.
Comment #10
dman commentedYep.
Fixed in #626168: Aspect switcher (dev 2.0)