{"action":"created","issue":{"url":"https://api.github.com/repos/rapila/cms-base/issues/210","labels_url":"https://api.github.com/repos/rapila/cms-base/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/rapila/cms-base/issues/210/comments","events_url":"https://api.github.com/repos/rapila/cms-base/issues/210/events","html_url":"https://github.com/rapila/cms-base/issues/210","id":96539210,"number":210,"title":"Preserve transparency when resizing png images","user":{"login":"juergmessmer","id":374433,"avatar_url":"https://avatars.githubusercontent.com/u/374433?v=3","gravatar_id":"","url":"https://api.github.com/users/juergmessmer","html_url":"https://github.com/juergmessmer","followers_url":"https://api.github.com/users/juergmessmer/followers","following_url":"https://api.github.com/users/juergmessmer/following{/other_user}","gists_url":"https://api.github.com/users/juergmessmer/gists{/gist_id}","starred_url":"https://api.github.com/users/juergmessmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergmessmer/subscriptions","organizations_url":"https://api.github.com/users/juergmessmer/orgs","repos_url":"https://api.github.com/users/juergmessmer/repos","events_url":"https://api.github.com/users/juergmessmer/events{/privacy}","received_events_url":"https://api.github.com/users/juergmessmer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapila/cms-base/labels/level-bug","name":"level-bug","color":"02e10c"},{"url":"https://api.github.com/repos/rapila/cms-base/labels/logic-php","name":"logic-php","color":"d93cd4"}],"state":"open","locked":false,"assignee":{"login":"juergmessmer","id":374433,"avatar_url":"https://avatars.githubusercontent.com/u/374433?v=3","gravatar_id":"","url":"https://api.github.com/users/juergmessmer","html_url":"https://github.com/juergmessmer","followers_url":"https://api.github.com/users/juergmessmer/followers","following_url":"https://api.github.com/users/juergmessmer/following{/other_user}","gists_url":"https://api.github.com/users/juergmessmer/gists{/gist_id}","starred_url":"https://api.github.com/users/juergmessmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergmessmer/subscriptions","organizations_url":"https://api.github.com/users/juergmessmer/orgs","repos_url":"https://api.github.com/users/juergmessmer/repos","events_url":"https://api.github.com/users/juergmessmer/events{/privacy}","received_events_url":"https://api.github.com/users/juergmessmer/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-22T11:13:18Z","updated_at":"2015-07-22T11:37:46Z","closed_at":null,"body":"I tried to analyze why transparency is not preserved when an image is resized and found out the version_compare doesn't work the way I'd expect it.\r\n\r\nMy local GD Version is “bundled (2.1.0 compatible)”. Though this version seems to be a newer version than the one (“2.0.1”) compared with, version_compare returns false. When I ignore this for test purposes, then the image is reduced and the transparency is perfectly preserved. (Image::resizeImage() line 251)\r\n"},"comment":{"url":"https://api.github.com/repos/rapila/cms-base/issues/comments/123683350","html_url":"https://github.com/rapila/cms-base/issues/210#issuecomment-123683350","issue_url":"https://api.github.com/repos/rapila/cms-base/issues/210","id":123683350,"user":{"login":"juergmessmer","id":374433,"avatar_url":"https://avatars.githubusercontent.com/u/374433?v=3","gravatar_id":"","url":"https://api.github.com/users/juergmessmer","html_url":"https://github.com/juergmessmer","followers_url":"https://api.github.com/users/juergmessmer/followers","following_url":"https://api.github.com/users/juergmessmer/following{/other_user}","gists_url":"https://api.github.com/users/juergmessmer/gists{/gist_id}","starred_url":"https://api.github.com/users/juergmessmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juergmessmer/subscriptions","organizations_url":"https://api.github.com/users/juergmessmer/orgs","repos_url":"https://api.github.com/users/juergmessmer/repos","events_url":"https://api.github.com/users/juergmessmer/events{/privacy}","received_events_url":"https://api.github.com/users/juergmessmer/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T11:37:46Z","updated_at":"2015-07-22T11:37:46Z","body":"Using preg_match() the way you suggest returns no matches. If I replace “{2}” by “{2,1}” or remove it then the first result is “2.1.”. Is the handling of the period the problem or 0?"}}