{"action":"opened","number":10,"pull_request":{"url":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/10","id":33311072,"html_url":"https://github.com/mike-lischke/GraphicEx/pull/10","diff_url":"https://github.com/mike-lischke/GraphicEx/pull/10.diff","patch_url":"https://github.com/mike-lischke/GraphicEx/pull/10.patch","issue_url":"https://api.github.com/repos/mike-lischke/GraphicEx/issues/10","number":10,"state":"open","locked":false,"title":"Basic saving capabilities","user":{"login":"nabbla","id":1454012,"avatar_url":"https://avatars.githubusercontent.com/u/1454012?v=3","gravatar_id":"","url":"https://api.github.com/users/nabbla","html_url":"https://github.com/nabbla","followers_url":"https://api.github.com/users/nabbla/followers","following_url":"https://api.github.com/users/nabbla/following{/other_user}","gists_url":"https://api.github.com/users/nabbla/gists{/gist_id}","starred_url":"https://api.github.com/users/nabbla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nabbla/subscriptions","organizations_url":"https://api.github.com/users/nabbla/orgs","repos_url":"https://api.github.com/users/nabbla/repos","events_url":"https://api.github.com/users/nabbla/events{/privacy}","received_events_url":"https://api.github.com/users/nabbla/received_events","type":"User","site_admin":false},"body":"1. ftEnableSaving flag introduced for TFormatTypes, it should be set for graphic formats with supported SaveToFile procedure. So if we have SavePictureDialog (or plain SaveDialog), at startup (formCreate or smth like that) we write:\r\n\r\nSavePictureDialog.Filter:=FileFormatList.GetGraphicFilter([ftEnableSaving],fstNone,[foIncludeExtension],nil);\r\n\r\n2. UnregisterFileFormat changed a bit to allow replacing some of file formats with third-party libs without memory leak or access violation. Situation like this is handled:\r\n\r\n//initialization section\r\nRegisterFileFormat('png', gesPortableNetworkGraphic, '', [ftRaster], False, TPNGGraphic);\r\n\r\n//FormCreate\r\nFileFormatList.RegisterFileFormat('png', gesPortableNetworkGraphic, '',[ftRaster,ftEnableSaving], True, TPNGObject);\r\n\r\n//finalization section\r\nUnregisterFileFormat('', TPNGGraphic);\r\n\r\nAfter TPNGGraphic is replaced with TPngObject, Unregister procedure doesn't find already removed entry and stops.\r\n\r\n3. SaveGraphicToFile(source: TGraphic; FileName: string) introduced, it determines by file extension, what file format to save and performs conversion if it's needed. For TBitmap descendants, source is drawed in Canvas, native formats which are not TBitmap are handled individually.\r\nAt last, if we have third-party TGraphic which is not TBitmap, we try to use Assign procedure to convert source to this format. For pngimage lib it works.\r\n\r\nSimplest demo program included.\r\n","created_at":"2015-04-14T23:48:09Z","updated_at":"2015-04-14T23:48:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80347161fc1e285d96f2416d4e84cfa6c4a1865d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/10/commits","review_comments_url":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/10/comments","review_comment_url":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mike-lischke/GraphicEx/issues/10/comments","statuses_url":"https://api.github.com/repos/mike-lischke/GraphicEx/statuses/064ef89533d79047ada8aaf2707053943ff1eec0","head":{"label":"nabbla:master","ref":"master","sha":"064ef89533d79047ada8aaf2707053943ff1eec0","user":{"login":"nabbla","id":1454012,"avatar_url":"https://avatars.githubusercontent.com/u/1454012?v=3","gravatar_id":"","url":"https://api.github.com/users/nabbla","html_url":"https://github.com/nabbla","followers_url":"https://api.github.com/users/nabbla/followers","following_url":"https://api.github.com/users/nabbla/following{/other_user}","gists_url":"https://api.github.com/users/nabbla/gists{/gist_id}","starred_url":"https://api.github.com/users/nabbla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nabbla/subscriptions","organizations_url":"https://api.github.com/users/nabbla/orgs","repos_url":"https://api.github.com/users/nabbla/repos","events_url":"https://api.github.com/users/nabbla/events{/privacy}","received_events_url":"https://api.github.com/users/nabbla/received_events","type":"User","site_admin":false},"repo":{"id":33898332,"name":"GraphicEx","full_name":"nabbla/GraphicEx","owner":{"login":"nabbla","id":1454012,"avatar_url":"https://avatars.githubusercontent.com/u/1454012?v=3","gravatar_id":"","url":"https://api.github.com/users/nabbla","html_url":"https://github.com/nabbla","followers_url":"https://api.github.com/users/nabbla/followers","following_url":"https://api.github.com/users/nabbla/following{/other_user}","gists_url":"https://api.github.com/users/nabbla/gists{/gist_id}","starred_url":"https://api.github.com/users/nabbla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nabbla/subscriptions","organizations_url":"https://api.github.com/users/nabbla/orgs","repos_url":"https://api.github.com/users/nabbla/repos","events_url":"https://api.github.com/users/nabbla/events{/privacy}","received_events_url":"https://api.github.com/users/nabbla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nabbla/GraphicEx","description":"GraphicEx - a Delphi image loader library","fork":true,"url":"https://api.github.com/repos/nabbla/GraphicEx","forks_url":"https://api.github.com/repos/nabbla/GraphicEx/forks","keys_url":"https://api.github.com/repos/nabbla/GraphicEx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nabbla/GraphicEx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nabbla/GraphicEx/teams","hooks_url":"https://api.github.com/repos/nabbla/GraphicEx/hooks","issue_events_url":"https://api.github.com/repos/nabbla/GraphicEx/issues/events{/number}","events_url":"https://api.github.com/repos/nabbla/GraphicEx/events","assignees_url":"https://api.github.com/repos/nabbla/GraphicEx/assignees{/user}","branches_url":"https://api.github.com/repos/nabbla/GraphicEx/branches{/branch}","tags_url":"https://api.github.com/repos/nabbla/GraphicEx/tags","blobs_url":"https://api.github.com/repos/nabbla/GraphicEx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nabbla/GraphicEx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nabbla/GraphicEx/git/refs{/sha}","trees_url":"https://api.github.com/repos/nabbla/GraphicEx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nabbla/GraphicEx/statuses/{sha}","languages_url":"https://api.github.com/repos/nabbla/GraphicEx/languages","stargazers_url":"https://api.github.com/repos/nabbla/GraphicEx/stargazers","contributors_url":"https://api.github.com/repos/nabbla/GraphicEx/contributors","subscribers_url":"https://api.github.com/repos/nabbla/GraphicEx/subscribers","subscription_url":"https://api.github.com/repos/nabbla/GraphicEx/subscription","commits_url":"https://api.github.com/repos/nabbla/GraphicEx/commits{/sha}","git_commits_url":"https://api.github.com/repos/nabbla/GraphicEx/git/commits{/sha}","comments_url":"https://api.github.com/repos/nabbla/GraphicEx/comments{/number}","issue_comment_url":"https://api.github.com/repos/nabbla/GraphicEx/issues/comments{/number}","contents_url":"https://api.github.com/repos/nabbla/GraphicEx/contents/{+path}","compare_url":"https://api.github.com/repos/nabbla/GraphicEx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nabbla/GraphicEx/merges","archive_url":"https://api.github.com/repos/nabbla/GraphicEx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nabbla/GraphicEx/downloads","issues_url":"https://api.github.com/repos/nabbla/GraphicEx/issues{/number}","pulls_url":"https://api.github.com/repos/nabbla/GraphicEx/pulls{/number}","milestones_url":"https://api.github.com/repos/nabbla/GraphicEx/milestones{/number}","notifications_url":"https://api.github.com/repos/nabbla/GraphicEx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nabbla/GraphicEx/labels{/name}","releases_url":"https://api.github.com/repos/nabbla/GraphicEx/releases{/id}","created_at":"2015-04-13T22:53:09Z","updated_at":"2015-04-14T23:36:58Z","pushed_at":"2015-04-14T23:36:58Z","git_url":"git://github.com/nabbla/GraphicEx.git","ssh_url":"git@github.com:nabbla/GraphicEx.git","clone_url":"https://github.com/nabbla/GraphicEx.git","svn_url":"https://github.com/nabbla/GraphicEx","homepage":"www.soft-gems.net","size":61696,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mike-lischke:master","ref":"master","sha":"e041d6c3a13a2e13cfea208de7053c4c6f6109b4","user":{"login":"mike-lischke","id":2398704,"avatar_url":"https://avatars.githubusercontent.com/u/2398704?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-lischke","html_url":"https://github.com/mike-lischke","followers_url":"https://api.github.com/users/mike-lischke/followers","following_url":"https://api.github.com/users/mike-lischke/following{/other_user}","gists_url":"https://api.github.com/users/mike-lischke/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-lischke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-lischke/subscriptions","organizations_url":"https://api.github.com/users/mike-lischke/orgs","repos_url":"https://api.github.com/users/mike-lischke/repos","events_url":"https://api.github.com/users/mike-lischke/events{/privacy}","received_events_url":"https://api.github.com/users/mike-lischke/received_events","type":"User","site_admin":false},"repo":{"id":17314553,"name":"GraphicEx","full_name":"mike-lischke/GraphicEx","owner":{"login":"mike-lischke","id":2398704,"avatar_url":"https://avatars.githubusercontent.com/u/2398704?v=3","gravatar_id":"","url":"https://api.github.com/users/mike-lischke","html_url":"https://github.com/mike-lischke","followers_url":"https://api.github.com/users/mike-lischke/followers","following_url":"https://api.github.com/users/mike-lischke/following{/other_user}","gists_url":"https://api.github.com/users/mike-lischke/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-lischke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-lischke/subscriptions","organizations_url":"https://api.github.com/users/mike-lischke/orgs","repos_url":"https://api.github.com/users/mike-lischke/repos","events_url":"https://api.github.com/users/mike-lischke/events{/privacy}","received_events_url":"https://api.github.com/users/mike-lischke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mike-lischke/GraphicEx","description":"GraphicEx - a Delphi image loader library","fork":false,"url":"https://api.github.com/repos/mike-lischke/GraphicEx","forks_url":"https://api.github.com/repos/mike-lischke/GraphicEx/forks","keys_url":"https://api.github.com/repos/mike-lischke/GraphicEx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mike-lischke/GraphicEx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mike-lischke/GraphicEx/teams","hooks_url":"https://api.github.com/repos/mike-lischke/GraphicEx/hooks","issue_events_url":"https://api.github.com/repos/mike-lischke/GraphicEx/issues/events{/number}","events_url":"https://api.github.com/repos/mike-lischke/GraphicEx/events","assignees_url":"https://api.github.com/repos/mike-lischke/GraphicEx/assignees{/user}","branches_url":"https://api.github.com/repos/mike-lischke/GraphicEx/branches{/branch}","tags_url":"https://api.github.com/repos/mike-lischke/GraphicEx/tags","blobs_url":"https://api.github.com/repos/mike-lischke/GraphicEx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mike-lischke/GraphicEx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mike-lischke/GraphicEx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mike-lischke/GraphicEx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mike-lischke/GraphicEx/statuses/{sha}","languages_url":"https://api.github.com/repos/mike-lischke/GraphicEx/languages","stargazers_url":"https://api.github.com/repos/mike-lischke/GraphicEx/stargazers","contributors_url":"https://api.github.com/repos/mike-lischke/GraphicEx/contributors","subscribers_url":"https://api.github.com/repos/mike-lischke/GraphicEx/subscribers","subscription_url":"https://api.github.com/repos/mike-lischke/GraphicEx/subscription","commits_url":"https://api.github.com/repos/mike-lischke/GraphicEx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mike-lischke/GraphicEx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mike-lischke/GraphicEx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mike-lischke/GraphicEx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mike-lischke/GraphicEx/contents/{+path}","compare_url":"https://api.github.com/repos/mike-lischke/GraphicEx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mike-lischke/GraphicEx/merges","archive_url":"https://api.github.com/repos/mike-lischke/GraphicEx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mike-lischke/GraphicEx/downloads","issues_url":"https://api.github.com/repos/mike-lischke/GraphicEx/issues{/number}","pulls_url":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls{/number}","milestones_url":"https://api.github.com/repos/mike-lischke/GraphicEx/milestones{/number}","notifications_url":"https://api.github.com/repos/mike-lischke/GraphicEx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mike-lischke/GraphicEx/labels{/name}","releases_url":"https://api.github.com/repos/mike-lischke/GraphicEx/releases{/id}","created_at":"2014-03-01T12:30:04Z","updated_at":"2015-02-16T08:05:08Z","pushed_at":"2015-04-14T23:48:10Z","git_url":"git://github.com/mike-lischke/GraphicEx.git","ssh_url":"git@github.com:mike-lischke/GraphicEx.git","clone_url":"https://github.com/mike-lischke/GraphicEx.git","svn_url":"https://github.com/mike-lischke/GraphicEx","homepage":"www.soft-gems.net","size":61901,"stargazers_count":14,"watchers_count":14,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/10"},"html":{"href":"https://github.com/mike-lischke/GraphicEx/pull/10"},"issue":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/issues/10"},"comments":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/mike-lischke/GraphicEx/statuses/064ef89533d79047ada8aaf2707053943ff1eec0"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":213,"deletions":23,"changed_files":6}}