{"action":"created","issue":{"url":"https://api.github.com/repos/opencaching/opencaching-pl/issues/191","labels_url":"https://api.github.com/repos/opencaching/opencaching-pl/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/opencaching/opencaching-pl/issues/191/comments","events_url":"https://api.github.com/repos/opencaching/opencaching-pl/issues/191/events","html_url":"https://github.com/opencaching/opencaching-pl/pull/191","id":98266341,"number":191,"title":"automatic picture resizing. fixes #28","user":{"login":"wloczynutka","id":11460149,"avatar_url":"https://avatars.githubusercontent.com/u/11460149?v=3","gravatar_id":"","url":"https://api.github.com/users/wloczynutka","html_url":"https://github.com/wloczynutka","followers_url":"https://api.github.com/users/wloczynutka/followers","following_url":"https://api.github.com/users/wloczynutka/following{/other_user}","gists_url":"https://api.github.com/users/wloczynutka/gists{/gist_id}","starred_url":"https://api.github.com/users/wloczynutka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wloczynutka/subscriptions","organizations_url":"https://api.github.com/users/wloczynutka/orgs","repos_url":"https://api.github.com/users/wloczynutka/repos","events_url":"https://api.github.com/users/wloczynutka/events{/privacy}","received_events_url":"https://api.github.com/users/wloczynutka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-30T21:14:53Z","updated_at":"2015-08-03T10:18:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opencaching/opencaching-pl/pulls/191","html_url":"https://github.com/opencaching/opencaching-pl/pull/191","diff_url":"https://github.com/opencaching/opencaching-pl/pull/191.diff","patch_url":"https://github.com/opencaching/opencaching-pl/pull/191.patch"},"body":"Ready to merge.\r\nmaximum image weight is set to 2.6 MB. Images are automaticly downsize to 640x480, approx. 25-50Kb.\r\nAny comments?"},"comment":{"url":"https://api.github.com/repos/opencaching/opencaching-pl/issues/comments/127185207","html_url":"https://github.com/opencaching/opencaching-pl/pull/191#issuecomment-127185207","issue_url":"https://api.github.com/repos/opencaching/opencaching-pl/issues/191","id":127185207,"user":{"login":"andrixnet","id":3382777,"avatar_url":"https://avatars.githubusercontent.com/u/3382777?v=3","gravatar_id":"","url":"https://api.github.com/users/andrixnet","html_url":"https://github.com/andrixnet","followers_url":"https://api.github.com/users/andrixnet/followers","following_url":"https://api.github.com/users/andrixnet/following{/other_user}","gists_url":"https://api.github.com/users/andrixnet/gists{/gist_id}","starred_url":"https://api.github.com/users/andrixnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrixnet/subscriptions","organizations_url":"https://api.github.com/users/andrixnet/orgs","repos_url":"https://api.github.com/users/andrixnet/repos","events_url":"https://api.github.com/users/andrixnet/events{/privacy}","received_events_url":"https://api.github.com/users/andrixnet/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T10:18:41Z","updated_at":"2015-08-03T10:18:41Z","body":"\nOn 2015-07-31 4:22 PM, Łza z Włóczynutki wrote:\n>\n> 1.\n>\n>     Resize do not remove nor disturb any funcionality. Now, user is\n>     limited to post 100Kb small image. If he try post larger filesize,\n>     error message is displayed. He must downsize picture at home\n>     software, then upload again. This feature just make life simpler -\n>     user do not need any more downsize images on separate software,\n>     image is downsized automaticly.\n>\n> 2.\n>\n>     jpg, gif, png are accepted, and not converted into other format.\n>\nThen what does this line mean?\n\nfunction save($filename, $image_type = IMAGETYPE_JPEG, $compression = 75, $permissions = null)\n\nMy understanding is that it defines default values for optional parameters.\nThe function contains several if clauses depending on $image_type.\nHowever I could find only one call to this function, and that call only\nhad one parameter: $filename.\nSince $image_type is not propagated and has default value\nIMAGETYPE_JPEG, am I correct then in assuming that format conversion\ndoes occur?\n\nIf this assumption is correct, then even images that need not be resized\nare still processed by same function in the end, and would be converted.\n\nIf my assumption is wrong, then I am definitely missing something... (?)\n>\n> 1.\n>\n>     User is still able to attach ANY format and size of picture in\n>     description using tinyMce features.\n>\nIndeed. This was never a point.\n>\n> 1.\n>\n>     Images bellow limit are not processed.\n>\nbut still saved with same save() function having only filename as\nparameter ?\n>\n> 1.\n>\n>     picture aspect ratio is not affected\n>\nIndeed. (it never should be affected)\n>\n> 1.\n>\n>     Yes, No I see that maybe I missed width and height. and forgot\n>     square images. But please test an confirm if images are resized\n>     wrong. (you can switch to this branch on your local machine). Then\n>     I (or anyone) can correct it.\n>\nI will (try). Still working on familiarizing myself with GIT.\n>\n> 1.\n>\n>     To much configurable things make system not clear.\n>\nI would disagree. IMO hardcoded parameters that have no explicit reason\nfor having a certain value and only that value are a bad practice.\nBeing a configuration option with a default value (which most people\nperhaps will never change) is still much better.\n>\n> 1.\n>\n>     I'm sure many of us at the moment do not know what most of\n>     settings in settings.inc.php are used for.\n>\nI have studied the options quite a lot when I installed the site the\nfirst time and fiddled and personalized quite a number of them and\ntested the effects of some of them several times before deciding on the\nfinal value.\nFrom sysadmin perspective, it is important to know them/about them and\nmost important, to have them.\nI found many of them of great usefulness. Others I left as default\nvalues, and a few were quite hard to deal with. (the texts defined for\nsome pages).\n\nSuch settings, well grouped and each having a small comment section,\nwould be best. I did try a few times to do this, however, not wanting to\ndisturb some ongoing developments, and other constraints, I put the idea\non hold.\n\nI might suggest squid.conf (from squid cache project) as an excellent\nreference. >95% of settings are good defaults. All settings are very\nwell documented with comments in the sample configuration file.\n\n> 1.\n>\n>     And many of us not sure how many of they really are used.\n>\nIt is true that there may be some settings that are not used, are\ndeprecated, or are used in some parts of the code, but in other parts\nare not. In time, this will gradually be corrected by contributions,\nsome of which, I hope, will be my own.\n>\n> 1.\n>\n>     If you really interesed witch make it configurable, feel free to\n>     do it. We can agree that I will wait for changes on this branch\n>     one week more, and I merge feature on Monday, 10 August.\n>\nI will try to experiment with it, as much as possible.\n>\n> 1.\n>\n>     Please anyone feel free to translate hardcoded things. (They were\n>     found and moved here from separate file).\n>\nTranslation updates are a long overdue task of mine, indeed.\nI may also soon add hungarian as language and translation file.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/opencaching/opencaching-pl/pull/191#issuecomment-126690146>.\n>\n\n"}}