issue with i.php ?

vincent3569 Member, Translator
hi,

before my upgrade to 1.4.5 and Imagick, the following url was working :

`[domain_name]/zp-core/i.php?a=[album_name]&i=[picture_name]&s=800&cw=1100&ch=260&cx=0&cy=40&wmk=!`

for now, it doesn't work anymore and I have to use this url :
`[domain_name]/zp-core/i.php?a=[album_name]&i=[picture_name]&w=800&cw=1100&ch=260&cx=0&cy=40&wmk=!`

I have to use w ("width" without using a "hight") rather than s ("size" to set longer size of picture, without seting "width" or "hight").

is there an issue somewhere ?
btw, I haven't tested some functions like getCustomImageURL() which have the following parametrers :
int $size: the size of the image to have
int $width: width
int $height: height
int $cropw: crop width
int $croph: crop height
int $cropx: crop part x axis
int $cropy: crop part y axis

$width, and $height are used in determining the final image size. At least one of these must be provided. If $size is provided, $width and $height are ignored. If both $width and $height are provided, the image will have those dimensions regardless of the original image height/width ratio. (Yes, this means that the image may be distorted!)

Comments

  • acrylian Administrator, Developer
    If you use "s" that means a non cropped image. Actually if using cropped images you always should set width and height plus cropwidth and cropheight.
    I don't think anything changed with the image processor.
  • vincent3569 Member, Translator
    the 1st syntax was working when I was with 1.4.4.5 (and GD) but doesn't work with 1.4.5.2 (and Imaginck) : the picture is cropped but stays with initial proportions (1100x260, in my example)

    If I set "width", "cropwidth" and "cropheight", it work without "hight" being set, but reverse case (only set "hight", "cropwidth" and "cropheight") doesn't work.
  • acrylian Administrator, Developer
    Best you open a ticket then.
  • Are you creating these links directly or using one of the custom image functions? If the former you are doomed to failure. Among other things there is a required security parameter now.

    If the former, what are is the function call and its parameters?

    Also, you should try like graphics libraries to be sure that the problem is not with the library instead of the release. As acrylian has said nothing has changed with the image processing.
  • vincent3569 Member, Translator
    hi
    with tinyMCE used in admin/news, I can't have a cropped picture to suit my needs (I can set s[x]/ cw[y] x ch[z], but I can't set offset of cropped pictures : cx and cy).
    so, I decided to overwrite the src path of the picture given by tinyMCE, to set these values cx and cy before saving news.

    with that, correct cache image is generated, you can see example here : http://www.vincentbourganel.fr/news/nd-400-filter?locale=en_US

    but as told before, when I use i.php, I have to set `width` parameter rather than `size` parameter.

    in other hand, in a page, I use `printCustomSizedImage('Portfolio', 500, null, null, 800, 600, 50, 0);` in a Codeblocks and it works well (`size` is set, but neither `width` and `height`).

    it is certainly the most important that Zenpage functions are working properly.
    But I can't figure why i.php doesn't work the same way...

    I will have a try with GDlibrary rather than Imagick,to see if something changes.
  • acrylian Administrator, Developer
    See my answer on the other topic. If you need to change the size, re-embed it via tinyZenpage.
  • vincent3569 Member, Translator
    I don't know if something changes with image processing, but in fact, there are differences between 1.4.4.8 and 1.4.5.5 :

    - 1.4.4.8 with GD (same thing with Imagick)
    http://dev.vincentbourganel.fr/zp-core/i.php?a=20110721-vacances-ete-pays-basque&i=img_5671.jpg&s=800&cw=1100&ch=260&cx=0&cy=40&debug

    - 1.4.5.5 with GD (same thing with Imagick)
    http://test.vincentbourganel.fr/zp-core/i.php?a=20110721-vacances-ete-pays-basque&i=img_5671.jpg&s=800&cw=1100&ch=260&cx=0&cy=40&debug

    In first case, I have set only 'size' to resize a cropped picture (but in fact, if I set only 'width', the result is the same).

    In last case, I have to set 'width' rather than 'size' to resize a cropped picture (only 'size' doesn't work).
  • acrylian Administrator, Developer
    Setting only size means always uncropped images actually. That is how the defaultsize image is created, if size is longest or smallest size is an option. If you want to crop you actually need to set width/height and cropwidth/height.

    The best is really to use the class methodes as there is sometimes a bit more calculating involved.
  • I don't know what might have changed, but I do note that your parameters are pretty much self contradictory. You set the size of the image to 800 yet you want it to be 1100x260 when cropped. I do not think this makes any sense as that cropped image is definitively larger than the size request.

    Have you tried to see if things work if the size is as large as the crop?
  • vincent3569 Member, Translator
    it is the opposite: I want a resized picture of 800 (in longest size) from a crop of 1100x260 of my original picture.
Sign In or Register to comment.