Piwigo.org

You are not logged in. (Register / Login)

Announcement

Post a reply

Write your message and submit

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Zaphod
2012-04-03 21:56:08

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.

plg
2012-04-03 21:39:26

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.

Zaphod
2012-04-03 21:25:46

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.

plg
2012-04-02 15:58:46

OK, understood, very "compressed" way to store this information :-)

Thank you for explanation.

rvelices
2012-04-02 14:45:31

4 letters: left, top, right, bottom of center of interest as a fraction encoded as a = 0 z = 1

Code:

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)

plg
2012-04-02 14:13:08

Hi rvelices,

I just gave a look at how the coi is stored in the database:

Code:

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?

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013