Announcement

  •  » Engine
  •  » Documentation of multisize

Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#1 2013-01-03 19:04:26

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Documentation of multisize

Hello rvelices (and others)

I have a big problem : I try to understand the deep mechanisms of the multisize feature, including how configuration is saved, how crop/resize is computed, etc.
I failed

because your code is not commented at all, currently it's not a real problem because you are here to maintain your code, but if one day you quit the team we will be in trouble
I don't say your code is ugly, it's just very dense and complex :-)

So I would be really great if you take time to comment the files (and perhaps a wiki page ?)
i.php
include/derivative.inc.php
include/derivative_params.inc.php
include/derivative_std_params.inc.php
admin/include/configuration_sizes_process.inc.php

including the data model of ImageStdParams, DerivativeParams and SizingParams classes

Thank you


ps: recently I used a PHP wrapper of the Instagram API, and I needed to modify it, fortunately the author added consistent description of each classes and methods
[Github] PHP-Instagram-API file Instagram/Instagram.php

just saying :-D

Offline

 

#2 2013-01-03 19:24:02

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Documentation of multisize

Actually, rvelices is not responsible: I told him I would comment file i.php (at least this one). I could also comment admin/include/configuration_sizes_process.inc.php that I have modified a lot.

Yes, I agree that rvelices's code is dense :-) (but geniously dense I would say)

Offline

 

#3 2013-01-03 19:41:43

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Documentation of multisize

I think the data models would be a good starting, with a complete view of which attribute contain which data I could understand the whole thing

Offline

 

#4 2013-01-04 07:23:09

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Documentation of multisize

The only issue is time and motivation ... I have few time for piwigo and I always use it to do stuff instead of commenting ...
I'll try to find some time for comments.

However mistic, which part do you find harder to understand ?

Offline

 

#5 2013-01-04 11:39:57

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Documentation of multisize

- the datas models, not every attributes obviously but some of them (example: why SizingParams::max_crop is 0 or 100 on configuration process ?)

- why "1e-6" in derivative_params.inc line 212 (it's a detail)

- I don't get how those classes interact with each other :-( now I understand almost all method (after learning your habits it's easy ^^) but why they are here

- and why ImageStdParams::apply_global() is named like that ? I think this method should be renamed in something more transparent as it only precompute the value of "use_watermark"

Offline

 

#6 2013-01-22 06:01:04

Konve
Translation Team
2012-07-24
58

Re: Documentation of multisize

mistic100 wrote:

...I think this method should be renamed in something more transparent as it only precompute the value of "use_watermark"

Hello!

Could this be causing my problem?
If watermarks are enabled, the newly uploaded images are not displayed (only visible miniatures).
After turning off the "watermarks" all images visible.

Offline

 

#7 2013-01-22 06:13:51

Konve
Translation Team
2012-07-24
58

Re: Documentation of multisize

From server (?)

Fatal error: Uncaught exception 'ImagickException' with message 'corrupt image `./local/watermarks/www.png' @ error/png.c/ReadPNGImage/3776' in /home/host1255517/filpersona.ru/htdocs/www/admin/include/image.class.php:416 Stack trace: #0 /home/host1255517/filpersona.ru/htdocs/www/admin/include/image.class.php(416): Imagick->__construct('./local/waterma...') #1 /home/host1255517/filpersona.ru/htdocs/www/admin/include/image.class.php(87): image_imagick->__construct('./local/waterma...') #2 /home/host1255517/filpersona.ru/htdocs/www/i.php(581): pwg_image->__construct('./local/waterma...') #3 {main} thrown in /home/host1255517/filpersona.ru/htdocs/www/admin/include/image.class.php on line 416

Offline

 

#8 2013-01-22 11:36:29

flop25
Piwigo Team
2006-07-06
7037

Re: Documentation of multisize

@Konve
This thread is not related to your issue
Please create a new topic explaining a bit more what you did thx


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Engine
  •  » Documentation of multisize

Board footer

Powered by FluxBB

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