|
Arbitrary-palette positional dithering algorithm[^]
I've been working on supporting color e-paper devices in IoT gadgets where the e-paper ranges from 2 to 7 colors that I've seen.
In order to allow you to load JPEG images onto these displays reasonably, some amount of dithering is extremely helpful, but I never thought it could be so involved.
Even if I never used it, this is an interesting read.
Real programmers use butterflies
|
|
|
|
|
|
I used to own that book.
Real programmers use butterflies
|
|
|
|
|
Ha!
I might have ripped the pages out quicker, had I known the code'd have been accessibly posted in the future. But as it was I must have scattered more than a few pages, crumpled up in individual wads then thrown into the bottom of a shipping box to serve as padding for those heavier X-mas gifts sent east ... through the years.
|
|
|
|
|
Very interesting!
I certainly learnt a few things about dithering that I didn't know before...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
I use a variant of one his algorithms in my code, but it's not fast enough for me for the devices I want to target. Then again, 640x448x3bits is taxing for any IoT device, even without dithering and color matching. I'm not even sure if that screen is practical at all though and I won't know until it arrives. It could be that the Pi is the only thing I have that will run it.
Real programmers use butterflies
|
|
|
|
|
It works fantastic for HTML to markdown, even allowing you to specify which Markdown dialect to use.
CloudConvert[^]
I use it for maintaining my GFX lib documentation - i load my codeproject content into it and produce readmes for Github. It's a snap.
Real programmers use butterflies
|
|
|
|
|
Probably belongs here: Free Tools Discussion Boards[^] - this forum is mostly for moments!
[edit]
You probably need to be careful with posts like this as well - it's a paid-for service with a free trial (25 per day), so some will consider it spam rather than a tool post.
[/edit]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I always post tools in the wrong section
*headdesk*
sorry.
Real programmers use butterflies
|
|
|
|
|
Online converters are so cool.
You can seemingly convert anything to anything today. 
modified 6-Jun-21 19:01pm.
|
|
|
|
|
Not quite. If those tools converted between C, C++, C#, Java, and Python, this site would be spared a lot of "Questions" that are nothing but code dumps asking for precisely that!
|
|
|
|
|
Quote: Not quite. If those tools converted between C, C++, C#, Java, and Python, this site would be spared a lot of "Questions" that are nothing but code dumps asking for precisely that!
Get after it then.
|
|
|
|
|
Greg Utas wrote: this site would be spared a lot of "Questions" that are nothing but code dumps asking for precisely that!
I admire your optimism!
Given the number of questions posted which could be answered by typing the question into Google and reading the first result, I doubt such a site would have any impact on the people who post the "convert this code for me" questions here.
Even if Chris managed to integrate the converter into the QA form, auto-detect questions about converting code, and automatically offer them the converted code, I suspect the questions would still get posted. After all, you can't expect them to have the time to actually read things on screen - they're far too busy trying to cheat on homework for a course they're not fit to pass.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Nice, thanks for the link.
The less you need, the more you have.
Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?
JaxCoder.com
|
|
|
|
|
I totally put it in the wrong place tho. Again. *hangs head in shame*
Still, I'm glad you found it helpful. I use it all the time.
Real programmers use butterflies
|
|
|
|
|
I have been working as a developer for a little over 40 years. In all that time, I have kept my comments clean. I am an avid user of curse words in my normal conversations, both verbal and online. It just always seemed unprofessional to use vulgar language in my code. Until today.
I am now saddled with responsible for a piece of product code that is over 30 years old and still in active use. It's in C and started out on custom-built embedded hardware. Now it runs under Windows on an industrial PC. The original creator of this pus-oozing bedsore author of this stuff deliberately wrote it in a fashion that no one else could maintain it. He even cultivated a mythology about it, that it was dangerous for other people to even look at it, because it was so "performance-intensive". A few years ago he decided to retire rather than accept reassignment to another product. A succession of other people have taken it over, but no significant maintenance has been performed.
We now have a hardware obsolescence issue that requires a code change. I've spent well over 100 hours over the last month going through the code, finding all references to the bits that need replaced. Based on my study, only 4 out of the over 20 functions in the module really do anything with the hardware that's going obsolete. The rest are basically stubs and no-ops, but their return values are used to direct logic elsewhere. I have had to trace every single reference to the functions and the global values involved to ensure that it was safe to change things. I had to leave all these other bits in place because removing them would have wreaked havoc in other logic I don't want to touch.
After all this, it took me less than a day to write the new code.
Software Zen: delete this;
|
|
|
|
|
And
There's probably a good business case for a site where developers saddled with this kind of thing can trade their jobs of breaking the perpetrators' legs.
|
|
|
|
|
'twould be nice, except this guy passed away a couple of years ago .
Software Zen: delete this;
|
|
|
|
|
I guess the Simulation will get broken any day now...
|
|
|
|
|
Gary Wheeler wrote: passed away a couple of years ago
Did he fall, or was he pushed?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Let me put it this way. The only thing he and I had in common is that we are/were both avid cyclists. I used to see him out on our local bike paths a couple times a month. It was so, so tempting...
Software Zen: delete this;
|
|
|
|
|
If you know where he's buried you could still arrange for his legs to be broken...
|
|
|
|
|
If I came across it, I hope my bladder's full...
Software Zen: delete this;
|
|
|
|
|
Congratulations! I don't envy you your task, and that's quite a rabbit to pull out of your hat.
Horror stories like these are how I convince my managers that code reviews are worth their weight in meetings.
Real programmers use butterflies
|
|
|
|
|
I've been working here for 30 years, and in all that time there has only been one code review ever held. At the end of that one, the developer on the 'hot seat' told his boss if he ever held another one, he'd quit. I wasn't present, but I'm pretty sure it wasn't handled very well. I don't think anyone went into it with the idea of "stabbing it with their steely knives" trying to kill the beast, but I doubt the ground rules were very detailed. Also, the guy chosen as the guinea pig was probably the worst choice to go first. Sharp guy and easy to work with, but not one to handle criticism well.
That said, if there had ever been any kind of detailed code review of the POS I'm modifying, the author would have been terminated with extreme prejudice shortly thereafter.
Software Zen: delete this;
|
|
|
|