Timeline for answer to Images with all colors by konstantinosX
Current License: CC BY-SA 3.0
Post Revisions
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 18, 2016 at 17:20 | comment | added | Mwr247 | Regarding the use of prototype: it works in much the same way that a static method would. When you have the function defined in the object literal, every new object you create must create a new copy of the function as well, and store them with that object instance (so 16 million color objects means 16 million copies of that exact same function in memory). By comparison, using prototype will only create it once, to be associated with the "class" rather than the object. This has obvious memory benefits as well as potential speed benefits. | |
| Aug 8, 2016 at 19:59 | comment | added | konstantinosX | “Defining methods of a class inside the constructor instead of using the prototype chain is really inefficient, especially if said class is used several times.” is very interesting comment Patrick Roberts. Do you have any reference with example that validates that ? , I sincerely would like to know if this claim has any base ( in order to stop using that ) , and what is it. | |
| Aug 5, 2016 at 17:05 | comment | added | Patrick Roberts |
Defining methods of a class inside the constructor instead of using the prototype chain is really inefficient, especially if said class is used several times. I really recommend that you move the methods for Color and Pixel to the prototype chain. I was going to comment also on Object.size until I realized you used that implementation to save memory rather than run quickly.
|
|
| Mar 16, 2014 at 11:38 | comment | added | konstantinosX | You can’t disable the delay at this but you can set it to 0. Because it is rather slow with one process I added the option to have simultaneously processes, as many as your system can handle. The speed also depends by the number of random colors from the preset pallet to select the best match for the next pixel. | |
| Mar 15, 2014 at 12:51 | comment | added | Mark Jeronimus | I can't seem to disable the delay in the script | |
| Mar 13, 2014 at 17:34 | comment | added | A.L | Okay, I'm sorry if you thought I was criticizing your answer. I just wondered if you were inspired by fejesjoco's answer since the resulting output looks similar. | |
| Mar 12, 2014 at 18:41 | history | edited | konstantinosX | CC BY-SA 3.0 |
added 14 characters in body
|
| Mar 11, 2014 at 3:29 | comment | added | konstantinosX | The algorithms are here and anyone can read and understand that are real different. This answer published after C# answer from fejesjoco declared as winner motivated of how nice its result is. Then I thought a whole different approach of processing and selecting neighbour colours, and this is it. Of course both answers have same basis, like evenly distribution of the colors used along the visible spectrum, the concept of relevant colours, and starting points, maybe fowling those basis someone could think that the images produced have a resemblance in some cases. | |
| Mar 9, 2014 at 21:48 | comment | added | A.L | That's nice but it looks like the C# answer from fejesjoco. Is it only by chance? | |
| S Mar 9, 2014 at 21:31 | history | suggested | A.L | CC BY-SA 3.0 |
Added language name and added code colorization
|
| Mar 9, 2014 at 21:21 | review | Suggested edits | |||
| S Mar 9, 2014 at 21:31 | |||||
| Mar 9, 2014 at 17:47 | review | First posts | |||
| Mar 9, 2014 at 17:53 | |||||
| Mar 9, 2014 at 17:29 | history | answered | konstantinosX | CC BY-SA 3.0 |