Hi rvelices,
I just gave a look at how the coi is stored in the database:
mysql> select coi from piwigo_images where coi is not null; +------+ | coi | +------+ | mbsj | | hbul | | garh | | kcqg | | lazk | | fbtl | +------+ 6 rows in set (0.00 sec)
can you explain what it means and how it's used in the code?
Offline
4 letters: left, top, right, bottom of center of interest as a fraction encoded as a = 0 z = 1
function char_to_fraction($c)
{
return (ord($c) - ord('a'))/25;
}
function fraction_to_char($f)
{
return ord('a') + round($f*25);
}used in class ImageRect crop_h() and crop_v() (derivative_params.inc.php)
Offline
OK, understood, very "compressed" way to store this information :-)
Thank you for explanation.
Offline
I never saw this new option (and I had no clue of what is was about before reading a post in the french forums), and that's just awesome.
Offline
Zaphod wrote:
[...] that's just awesome.
I agree. It is not a very easy concept but highly powerful and we can see the result "live" on all "cropped" sizes.
Offline
That's what's missing in most cases when you choose to use square thumbs, for example.
For reasonably small galleries, that's very useful.
Offline