On Thu, Nov 19, 2009 at 2:12 AM, Alexander Shulgin <[email protected]> wrote: > I agree. I'm willing to contribute some C or C++ code to do the low > level stuff of changing colors in the image. How do I proceed?
That's almost certainly unnecessary. texvc already uses some type of image processor (dvipng?) that can presumably be configured to output in any desired color. This part should thus be a one-line change -- see the patch at <https://bugzilla.wikimedia.org/show_bug.cgi?id=9341> for how it would likely be done. The rest of the patch would be hacking PHP (and maybe OCaml, ugh) code to accept the new parameter and pass it down to the right place. includes/Math.php would likely be the place to start here. On Thu, Nov 19, 2009 at 11:31 AM, Alexander Shulgin <[email protected]> wrote: > And how comes we can't post-process resulting PNG images with a > program written in a different language? :) We really don't want to increase the amount of non-PHP code in core unless absolutely necessary, IMO. PHP is an awful language, but it's the only thing that all current MediaWiki developers know. Anything else is much harder to maintain, because only some subset of people with commit access can competently alter it. I'm sure most committers know basic C syntax, but few would be confident enough to make significant changes to a C program (and if they tried they'd probably introduce giant memory leaks and such). Just a while ago, it took days to fix a simple XSS in Timeline because it was written in Perl. Besides, there's no need to reinvent the wheel. dvipng (which is apparently used here) should be able to do whatever we want, as far as I can tell. Failing that, ImageMagick or such would likely do the trick. _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
