{"action":"created","issue":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/422","repository_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor","labels_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/422/labels{/name}","comments_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/422/comments","events_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/422/events","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/422","id":163624805,"number":422,"title":"[framework] ImageProcessorBootstrapper not finding WebP plugin","user":{"login":"scottgerring","id":474021,"avatar_url":"https://avatars.githubusercontent.com/u/474021?v=3","gravatar_id":"","url":"https://api.github.com/users/scottgerring","html_url":"https://github.com/scottgerring","followers_url":"https://api.github.com/users/scottgerring/followers","following_url":"https://api.github.com/users/scottgerring/following{/other_user}","gists_url":"https://api.github.com/users/scottgerring/gists{/gist_id}","starred_url":"https://api.github.com/users/scottgerring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottgerring/subscriptions","organizations_url":"https://api.github.com/users/scottgerring/orgs","repos_url":"https://api.github.com/users/scottgerring/repos","events_url":"https://api.github.com/users/scottgerring/events{/privacy}","received_events_url":"https://api.github.com/users/scottgerring/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/enhancement","name":"enhancement","color":"009800"},{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/fixed%20on%20dev","name":"fixed on dev","color":"ffbf00"},{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/framework","name":"framework","color":"682079"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-04T08:14:12Z","updated_at":"2016-09-26T10:08:13Z","closed_at":"2016-07-07T11:47:36Z","body":"Hi,\r\n\r\nI've got a simple asnet5 web app set up, and have been using ImageProcessor to convert from PNG to WebP on the fly - which works great!\r\n\r\nWhen I try and convert the other way around - read WebP and output PNG - I get unsupported format exception:\r\n\r\n```\r\nInput stream is not a supported format.\r\n```\r\n\r\nIt looks like **ImageProcessorBootstrapper** is failing to discover the WebP plugin when it is initialised, returning only the built-in formats. I've wrapped my use of ImageProcessor into a class stored in an aspnet5 assembly, which references ImageProcessor as follows:\r\n\r\n```\r\n \"dependencies\": {\r\n    \"ImageProcessor\": \"2.4.1\",\r\n    \"ImageProcessor.Plugins.WebP\": \"1.0.5\",\r\n    \"Microsoft.AspNet.Mvc.Core\": \"6.0.0-rc1-final\"\r\n  }\r\n```\r\n\r\nOutside of that, I pull my library into a unit test assembly, and a mvc6 web app; in both contexts, the bootstrapper fails to discover WebP. Significantly, I can use reflection to prod the bootstrapper and jam the WebP plugin into ```SupportedImageFormats```, and everything works happily - however this is obviously not a great approach!\r\n\r\nI've had a look at the source, and it seems like there is no way to provide the bootstrapper with extra formatters, if its enumeration of the available assemblies doesn't yield everything we're looking for. It is difficult to replace the behaviour of the bootstrapper without modifying the library, as it is pulled statically into the processor. \r\n\r\nIs there some workaround for this that i'm missing, or a mechanism to modify the formatter bootstrap process?\r\n\r\nThanks,\r\n\r\nScott."},"comment":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/comments/249530569","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/422#issuecomment-249530569","issue_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/422","id":249530569,"user":{"login":"glat","id":569200,"avatar_url":"https://avatars.githubusercontent.com/u/569200?v=3","gravatar_id":"","url":"https://api.github.com/users/glat","html_url":"https://github.com/glat","followers_url":"https://api.github.com/users/glat/followers","following_url":"https://api.github.com/users/glat/following{/other_user}","gists_url":"https://api.github.com/users/glat/gists{/gist_id}","starred_url":"https://api.github.com/users/glat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glat/subscriptions","organizations_url":"https://api.github.com/users/glat/orgs","repos_url":"https://api.github.com/users/glat/repos","events_url":"https://api.github.com/users/glat/events{/privacy}","received_events_url":"https://api.github.com/users/glat/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T10:08:13Z","updated_at":"2016-09-26T10:08:13Z","body":"I had to use that method because I recompiled ImageProcessor with strong name to put in cache but the line is wrong. It does nothing because ToList() creates a clone of the object so the line:\r\n\r\nthis.SupportedImageFormats.ToList().AddRange(format);\r\n\r\nshould be:\r\n\r\nList<ISupportedImageFormat> list = this.SupportedImageFormats.ToList();\r\nlist.AddRange(format);\r\nthis.SupportedImageFormats = list;\r\n\r\nPlease try to let LoadSupportedImageFormats() load at least the internal formats without checking for assembly reference, or let it know about assembly in GAC.\r\n\r\nKind regards"}}
{"actor":{"display_login":"glat"}}