Announcement

  •  » Engine
  •  » Multi size : theme integration

#16 2012-02-08 20:39:03

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: Multi size : theme integration

I think we should remove the test and return the bigger image as possible with given parameters...


P@t

Offline

 

#17 2012-02-09 08:51:09

rvelices
Piwigo Team
2005-12-29
1960

Re: Multi size : theme integration

P@t wrote:

I think we should remove the test and return the bigger image as possible with given parameters...

ok

Offline

 

#18 2012-02-09 14:07:33

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: Multi size : theme integration

Is it possible to add function to retrieve derivative size in PwgTemplateAdapter class?

Code:

  function derivative_get_size($type, $img)
  {
    $src_image = new DerivativeImage($type, $img);
    return $src_image->get_size();
  }

  function derivative_get_size_htm($type, $img)
  {
    $src_image = new DerivativeImage($type, $img);
    return $src_image->get_size_htm();
  }

P@t

Offline

 

#19 2012-02-09 18:09:03

rvelices
Piwigo Team
2005-12-29
1960

Re: Multi size : theme integration

isn't it better to have just

Code:

function derivative($type, $img)
{
  return new DerivativeImage($type, $img);
}

you could use any member of DerivativeImage, eventually store the object and reuse it (to avoid recreating the same thing N times)

Offline

 

#20 2012-02-09 21:21:17

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: Multi size : theme integration

Of course, it's better :-)


P@t

Offline

 
  •  » Engine
  •  » Multi size : theme integration

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact