{"action":"created","issue":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/287","labels_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/287/comments","events_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/287/events","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/287","id":124627085,"number":287,"title":"Image now takes 4x memory size","user":{"login":"yufeih","id":511355,"avatar_url":"https://avatars.githubusercontent.com/u/511355?v=3","gravatar_id":"","url":"https://api.github.com/users/yufeih","html_url":"https://github.com/yufeih","followers_url":"https://api.github.com/users/yufeih/followers","following_url":"https://api.github.com/users/yufeih/following{/other_user}","gists_url":"https://api.github.com/users/yufeih/gists{/gist_id}","starred_url":"https://api.github.com/users/yufeih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yufeih/subscriptions","organizations_url":"https://api.github.com/users/yufeih/orgs","repos_url":"https://api.github.com/users/yufeih/repos","events_url":"https://api.github.com/users/yufeih/events{/privacy}","received_events_url":"https://api.github.com/users/yufeih/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/milestones/1","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/milestones/v3","labels_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/milestones/1/labels","id":1039931,"number":1,"title":"v3","description":"A cross platform super-duper edition.","creator":{"login":"JimBobSquarePants","id":385879,"avatar_url":"https://avatars.githubusercontent.com/u/385879?v=3","gravatar_id":"","url":"https://api.github.com/users/JimBobSquarePants","html_url":"https://github.com/JimBobSquarePants","followers_url":"https://api.github.com/users/JimBobSquarePants/followers","following_url":"https://api.github.com/users/JimBobSquarePants/following{/other_user}","gists_url":"https://api.github.com/users/JimBobSquarePants/gists{/gist_id}","starred_url":"https://api.github.com/users/JimBobSquarePants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JimBobSquarePants/subscriptions","organizations_url":"https://api.github.com/users/JimBobSquarePants/orgs","repos_url":"https://api.github.com/users/JimBobSquarePants/repos","events_url":"https://api.github.com/users/JimBobSquarePants/events{/privacy}","received_events_url":"https://api.github.com/users/JimBobSquarePants/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":5,"state":"open","created_at":"2015-03-26T12:46:04Z","updated_at":"2016-01-03T22:06:39Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-01-03T03:51:33Z","updated_at":"2016-01-04T03:42:48Z","closed_at":null,"body":"The pixels in `ImageBase` is represented by `float[]`. Each pixel is represented by 4 floats and requires 16 bytes. When pixels are represented using `byte[]`, each pixel only takes 4 bytes. This effectively takes 4x memory, a big concern on low memory devices like phones."},"comment":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/comments/168574202","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/287#issuecomment-168574202","issue_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/287","id":168574202,"user":{"login":"JimBobSquarePants","id":385879,"avatar_url":"https://avatars.githubusercontent.com/u/385879?v=3","gravatar_id":"","url":"https://api.github.com/users/JimBobSquarePants","html_url":"https://github.com/JimBobSquarePants","followers_url":"https://api.github.com/users/JimBobSquarePants/followers","following_url":"https://api.github.com/users/JimBobSquarePants/following{/other_user}","gists_url":"https://api.github.com/users/JimBobSquarePants/gists{/gist_id}","starred_url":"https://api.github.com/users/JimBobSquarePants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JimBobSquarePants/subscriptions","organizations_url":"https://api.github.com/users/JimBobSquarePants/orgs","repos_url":"https://api.github.com/users/JimBobSquarePants/repos","events_url":"https://api.github.com/users/JimBobSquarePants/events{/privacy}","received_events_url":"https://api.github.com/users/JimBobSquarePants/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T03:42:48Z","updated_at":"2016-01-04T03:42:48Z","body":"@yufeih A lot to think about there...\r\n\r\nIf I use byte with a backing uint I might as well drop the [`Bgra32`](https://github.com/JimBobSquarePants/ImageProcessor/blob/16b48d25e6920474c969a47085e07f34f4bc7ffd/src/ImageProcessor/Colors/Colorspaces/Bgra32.cs) class as I will be moving back to using the 0-255 range. That will certainly hurt should anyone wishing to develop an encoder/decoder for something like Radiance HDR which is certainly doable (converting from [this](http://www.graphics.cornell.edu/~bjw/rgbe/rgbe.c) for example)\r\n\r\nCasting to/from `Vector4` would solve some if not all of the accuracy issues. \r\n\r\nI don't use the other color spaces `Hsl`, `YCbCr`, etc yet but I want other developers to. I want a single location for accurate colorspace conversion so other developers can expand on the library. I use the dedicated algorithm in [Hue](https://github.com/JimBobSquarePants/ImageProcessor/blob/16b48d25e6920474c969a47085e07f34f4bc7ffd/src/ImageProcessor/Filters/ColorMatrix/Hue.cs) as it's faster than casting then adjusting each pixel.\r\n\r\nFloating point pixels has caused me issues for sure and I would like to keep memory usage to the absolute minimum. I just don't want to cripple the library like so many others are.\r\n\r\nI'm gonna do a shoutout on Twitter and see if I can get some input from experts out there. I'm sorely tempted to take up your suggestion but wanna be sure we do the right thing. \r\n\r\n"}}