{"action":"created","issue":{"url":"https://api.github.com/repos/lovell/sharp/issues/583","repository_url":"https://api.github.com/repos/lovell/sharp","labels_url":"https://api.github.com/repos/lovell/sharp/issues/583/labels{/name}","comments_url":"https://api.github.com/repos/lovell/sharp/issues/583/comments","events_url":"https://api.github.com/repos/lovell/sharp/issues/583/events","html_url":"https://github.com/lovell/sharp/issues/583","id":179173158,"number":583,"title":"How to get the trimmed pixel size of each edge?","user":{"login":"natural-law","id":488169,"avatar_url":"https://avatars.githubusercontent.com/u/488169?v=3","gravatar_id":"","url":"https://api.github.com/users/natural-law","html_url":"https://github.com/natural-law","followers_url":"https://api.github.com/users/natural-law/followers","following_url":"https://api.github.com/users/natural-law/following{/other_user}","gists_url":"https://api.github.com/users/natural-law/gists{/gist_id}","starred_url":"https://api.github.com/users/natural-law/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natural-law/subscriptions","organizations_url":"https://api.github.com/users/natural-law/orgs","repos_url":"https://api.github.com/users/natural-law/repos","events_url":"https://api.github.com/users/natural-law/events{/privacy}","received_events_url":"https://api.github.com/users/natural-law/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-26T08:57:33Z","updated_at":"2016-09-26T09:20:31Z","closed_at":null,"body":"@lovell \r\nI want to use sharp to trim my image and **get the trimmed pixel size from each edge**. Now I don't know how to get the trimmed pixel size of each edge.\r\n\r\nOn the other way, I've tried to calculate the data myself. **But there is not a interface to get the pixel of specified position.**\r\n\r\nCould you please show my a way to implement it? Thanks very much!"},"comment":{"url":"https://api.github.com/repos/lovell/sharp/issues/comments/249520502","html_url":"https://github.com/lovell/sharp/issues/583#issuecomment-249520502","issue_url":"https://api.github.com/repos/lovell/sharp/issues/583","id":249520502,"user":{"login":"lovell","id":210965,"avatar_url":"https://avatars.githubusercontent.com/u/210965?v=3","gravatar_id":"","url":"https://api.github.com/users/lovell","html_url":"https://github.com/lovell","followers_url":"https://api.github.com/users/lovell/followers","following_url":"https://api.github.com/users/lovell/following{/other_user}","gists_url":"https://api.github.com/users/lovell/gists{/gist_id}","starred_url":"https://api.github.com/users/lovell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovell/subscriptions","organizations_url":"https://api.github.com/users/lovell/orgs","repos_url":"https://api.github.com/users/lovell/repos","events_url":"https://api.github.com/users/lovell/events{/privacy}","received_events_url":"https://api.github.com/users/lovell/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T09:20:31Z","updated_at":"2016-09-26T09:20:31Z","body":"Hello, the logic for the `trim` operation lives fairly deep within the image processing pipeline - see https://github.com/lovell/sharp/blob/master/src/operations.cc#L410\r\n\r\nThe values used for the extraction are based on calculations performed with an intermediary image, which may already have undergone rotation and will potentially then undergo further extraction and resizing operations. This means the values won't necessarily relate to either the input or output dimensions. Although this might meet your specific use case, I'd be hesitant to expose it for all users."}}
{"actor":{"display_login":"lovell"}}