{"action":"created","issue":{"url":"https://api.github.com/repos/jcupitt/libvips/issues/934","repository_url":"https://api.github.com/repos/jcupitt/libvips","labels_url":"https://api.github.com/repos/jcupitt/libvips/issues/934/labels{/name}","comments_url":"https://api.github.com/repos/jcupitt/libvips/issues/934/comments","events_url":"https://api.github.com/repos/jcupitt/libvips/issues/934/events","html_url":"https://github.com/jcupitt/libvips/pull/934","id":312427621,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgwMjM0MTI3","number":934,"title":"Adding x,y arguments to vips_composite","user":{"login":"medakk","id":10536745,"node_id":"MDQ6VXNlcjEwNTM2NzQ1","avatar_url":"https://avatars1.githubusercontent.com/u/10536745?v=4","gravatar_id":"","url":"https://api.github.com/users/medakk","html_url":"https://github.com/medakk","followers_url":"https://api.github.com/users/medakk/followers","following_url":"https://api.github.com/users/medakk/following{/other_user}","gists_url":"https://api.github.com/users/medakk/gists{/gist_id}","starred_url":"https://api.github.com/users/medakk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medakk/subscriptions","organizations_url":"https://api.github.com/users/medakk/orgs","repos_url":"https://api.github.com/users/medakk/repos","events_url":"https://api.github.com/users/medakk/events{/privacy}","received_events_url":"https://api.github.com/users/medakk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-09T07:47:10Z","updated_at":"2018-09-06T16:01:31Z","closed_at":"2018-06-11T15:00:30Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/jcupitt/libvips/pulls/934","html_url":"https://github.com/jcupitt/libvips/pull/934","diff_url":"https://github.com/jcupitt/libvips/pull/934.diff","patch_url":"https://github.com/jcupitt/libvips/pull/934.patch"},"body":"This references issue https://github.com/jcupitt/libvips/issues/892\r\n\r\nI've added optional x, y coordinates to the `vips_composite` functions. \r\nThis uses `vips_embed` to resize all the images to the size of the target image, placed at the specified x, y coordinate. Example usage:\r\n```\r\nvips composite2 in0.png in1.png out.png over --x \"400\" --y \"20\"\r\n```\r\n![in0](https://user-images.githubusercontent.com/10536745/38485622-1b4e5974-3bf8-11e8-8acd-5e12742a8f6a.png)\r\n![in1](https://user-images.githubusercontent.com/10536745/38485627-1de3fae0-3bf8-11e8-9805-5907507f9af9.png)\r\n![out](https://user-images.githubusercontent.com/10536745/38485630-1f9cf9a4-3bf8-11e8-9a74-1cc76d50ebd1.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jcupitt/libvips/issues/comments/419149311","html_url":"https://github.com/jcupitt/libvips/pull/934#issuecomment-419149311","issue_url":"https://api.github.com/repos/jcupitt/libvips/issues/934","id":419149311,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTE0OTMxMQ==","user":{"login":"jcupitt","id":580843,"node_id":"MDQ6VXNlcjU4MDg0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/580843?v=4","gravatar_id":"","url":"https://api.github.com/users/jcupitt","html_url":"https://github.com/jcupitt","followers_url":"https://api.github.com/users/jcupitt/followers","following_url":"https://api.github.com/users/jcupitt/following{/other_user}","gists_url":"https://api.github.com/users/jcupitt/gists{/gist_id}","starred_url":"https://api.github.com/users/jcupitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcupitt/subscriptions","organizations_url":"https://api.github.com/users/jcupitt/orgs","repos_url":"https://api.github.com/users/jcupitt/repos","events_url":"https://api.github.com/users/jcupitt/events{/privacy}","received_events_url":"https://api.github.com/users/jcupitt/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T16:01:31Z","updated_at":"2018-09-06T16:01:31Z","author_association":"OWNER","body":"`composite2` was missing from the C++ binding in 8.6, unfortunately. 8.7 has it added, though that's still not out officially.\r\n\r\nYou can add it yourself very easily, it's just defined as:\r\n\r\n```c++\r\nVImage VImage::composite2( VImage overlay , VipsBlendMode mode , VOption *options ) const\r\n{\r\n    VImage out;\r\n\r\n    call( \"composite2\" ,\r\n        (options ? options : VImage::option()) ->\r\n            set( \"base\", *this ) ->\r\n            set( \"overlay\", overlay ) ->\r\n            set( \"out\", &out ) ->\r\n            set( \"mode\", mode ) );\r\n\r\n    return( out );\r\n}\r\n```"}}
{"actor":{"display_login":"jcupitt"}}