xoops forums

Gnomesu

Just popping in
Posted on: 2014/3/17 8:14
Gnomesu
Gnomesu (Show more)
Just popping in
Posts: 7
Since: 2013/2/5 3
#1

Thumbnails (reduced-size versions of pictures was created)

Whether it is possible to make somehow when uploading images in imagemanager the reduced-size versions (Thumbnails) of pictures was created?
Please forgive me for my English :)

luciorota

Module Developer
Posted on: 2014/3/17 10:58
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#2

Re: Thumbnails (reduced-size versions of pictures was created)

Hi Gnomesu
Xoops image manager doesn't create reduced images.
But, in latest Xoops versions, is possibile to use some image.php options.

help:
Enhanced image access/edit
This enhanced version is very useful in many cases, for example when you need a
smallest version of an image. This script uses Xoops cache to minimize server load.

Parameters need to be passed in through the URL's query string:
@param int id Xoops image id;
@param string url relative to XOOPS_MAIN_PATH, path of local image starting with "/" (e.g. /images/toast.jpg);
@param string src relative to XOOPS_MAIN_PATH, path of local image starting with "/" (e.g. /images/toast.jpg);
@param int width (optional) maximum width of final image in pixels (e.g. 700);
@param int height (optional) maximum height of final image in pixels (e.g. 700);
@param string color (optional) background hex color for filling transparent PNGs (e.g. 900 or 16a942);
@param string cropratio (optional) ratio of width to height to crop final image (e.g. 1:1 or 3:2);
@param boolean nocache (optional) don't read image from the cache;
@param boolean noservercache (optional) don't read image from the server cache;
@param boolean nobrowsercache (optional) don't read image from the browser cache;
@param int quality (optional, 0-100, default: 90) quality of output image;
@param mixed filter (optional, imagefilter 2nd, 3rd, 4th, 5th arguments, more info on php.net manual) a filter or an array of filters;
@param int radius (optional, 1, 2, 3 or 4 integer values, CW) round corner radius
@param float angle (optional), rotation angle)




examples:
Resizing a JPEG:
<img src="/image.php?url=image-name.jpg&width=100&height=100" alt="Don't forget your alt text" />

Resizing and cropping a JPEG into a square:
<img src="/image.php?url=image-name.jpg?width=100&height=100&cropratio=1:1" alt="Don't forget your alt text" />

Matting a PNG with #990000:
<img src="/image.php?url=image-name.png?color=900&image=/path/to/image.png" alt="Don't forget your alt text" />

Apply a filter:
<img src="/image.php?url=/path/to/image.png&filter=IMG_FILTER_COLORIZE,128,60,256" alt="Don't forget your alt text" />

Apply more filters (array) :
<img src="/image.php?url=/path/to/image.png&filter[]=IMG_FILTER_GRAYSCALE&filter[]=IMG_FILTER_COLORIZE,128,60,256" alt="Don't forget your alt text" />
Round the image corners:
All corners with same radius:
<img src="/image.php?url=/path/to/image.png&radius=20" alt="Don't forget your alt text" />

Left and right corners with different radius (20 for left corners and 40 for right corners)
<img src="/image.php?url=/path/to/image.png&radius=20,40" alt="Don't forget your alt text" />

4 corners, 4 radius, clockwise order
<img src="/image.php?url=/path/to/image.png&radius=20,40,0,10" alt="Don't forget your alt text" />


Gnomesu

Just popping in
Posted on: 2014/3/17 11:17
Gnomesu
Gnomesu (Show more)
Just popping in
Posts: 7
Since: 2013/2/5 3
#3

Re: Thumbnails (reduced-size versions of pictures was created)

Very badly that imagemanager in xoops of it can't still do. It seems, in EXMSystem there was such function

Gnomesu

Just popping in
Posted on: 2014/3/19 1:09
Gnomesu
Gnomesu (Show more)
Just popping in
Posts: 7
Since: 2013/2/5 3
#4

Re: Thumbnails (reduced-size versions of pictures was created)

I read that the MyAlbum module can be integrated into ImageManager.
I set MyAlbum 3.07 RC 4, in settings I included "Use [siteimg] in ImageManager Integration" but it didn't work
Maybe it is necessary to make something still?
I use XOOPS 2.5.7 Beta