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
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
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
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
- 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
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
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
@Konve
This thread is not related to your issue
Please create a new topic explaining a bit more what you did thx
Offline