{"action":"opened","issue":{"url":"https://api.github.com/repos/vdemedes/magician/issues/4","labels_url":"https://api.github.com/repos/vdemedes/magician/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/vdemedes/magician/issues/4/comments","events_url":"https://api.github.com/repos/vdemedes/magician/issues/4/events","html_url":"https://github.com/vdemedes/magician/issues/4","id":106030915,"number":4,"title":"method fit doesn't fit really","user":{"login":"norman784","id":204656,"avatar_url":"https://avatars.githubusercontent.com/u/204656?v=3","gravatar_id":"","url":"https://api.github.com/users/norman784","html_url":"https://github.com/norman784","followers_url":"https://api.github.com/users/norman784/followers","following_url":"https://api.github.com/users/norman784/following{/other_user}","gists_url":"https://api.github.com/users/norman784/gists{/gist_id}","starred_url":"https://api.github.com/users/norman784/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norman784/subscriptions","organizations_url":"https://api.github.com/users/norman784/orgs","repos_url":"https://api.github.com/users/norman784/repos","events_url":"https://api.github.com/users/norman784/events{/privacy}","received_events_url":"https://api.github.com/users/norman784/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-11T15:17:22Z","updated_at":"2015-09-11T15:17:22Z","closed_at":null,"body":"I think there is some bad naming on the method **fit** it is more a resize like, also found hard to do something so I ended up monkey patching the method, I think is missing the **fit** option\r\n\r\n```javascript\r\nMethods.fit = function (strategy) {\r\n  if (!strategy) {\r\n    strategy = \"clip\";\r\n  }\r\n\r\n  switch (strategy) {\r\n    case \"clip\":\r\n      this.set(\"-gravity\", this.get(\"gravity\") || \"center\");\r\n      this.set(\"-background\", this.get(\"-background\") || \"white\");\r\n      this.set(\"-extent\", this.get(\"-resize\"));\r\n      break;\r\n\r\n    case \"crop\":\r\n      this.set(\"-gravity\", this.get(\"gravity\") || \"center\");\r\n      this.set(\"-extent\", this.get(\"-resize\"));\r\n      this.unset(\"-resize\");\r\n      break;\r\n\r\n   case \"fit\":\r\n        this.set(\"-gravity\", this.get(\"gravity\") || \"center\");\r\n        this.set(\"-thumbnail\", this.get(\"-resize\") + '^');\r\n        this.set(\"-extent\", this.get(\"-resize\"));\r\n        this.unset(\"-resize\");\r\n        break;\r\n\r\n    case \"scale\":\r\n      this.force();\r\n      break;\r\n  }\r\n\r\n  return this;\r\n};\r\n```\r\n\r\nAdded the fit case which have the thumbnail property, don't know why if I do in this way it doesn't work\r\n\r\n```javascript\r\nimage\r\n    .use(function *(next){\r\n      this.set('-blur', '0x8');\r\n      this.set('-thumbnail', '200x200^');\r\n      yield next;\r\n    })\r\n    .resize(200, 200)\r\n    .fit('crop')\r\n```\r\n\r\nThe blur works just fine, but the **-thumbnail** doesn't work its completely ignored"}}