Closed (won't fix)
Project:
Image javascript crop
Version:
6.x-1.2
Component:
PHP
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2011 at 08:59 UTC
Updated:
23 Jun 2011 at 20:27 UTC
Problem is when we want create imagecached file by imagecache_build_derivative() function because javascript crop is ignored by imagecache. Why? Here is explanation:
function imagecrop_javascript_image(&$image, $data) {
$presetid = '';
// if a global presetid is been set, it meens the image is generated from the imagecrop module
if (isset($GLOBALS['imagecrop_presetid'])) {
$presetid = $GLOBALS['imagecrop_presetid'];
}
// and if not, then get the id from list of all presets
else {
$args = explode('/', $_GET['q']);
$key = array_search('imagecache', $args);
if ($key != FALSE) {
We don't have $_GET['q'] when we creating image programmatically and explode() can't be done. This is bug, I checked it and only javascript crop is omitted.
Comments
Comment #1
nils.destoop commentedThe problem is, that imagecache doesn't give enough information to the preset actions. So the only way for me, is checking q.
I should check if somewhere in imagecache_build_derivative, i can get more information, but i doubt it.
Comment #2
nils.destoop commentedIn both d7 and d6, there is no other possibility to know the current style, then checking the url. So when using image_style_create_derivative directly, imagecrop will never be able to work.