Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
svn diff -r 8805:8813 Changelog
svn: 'Changelog' is not under version control
svn diff -r 8800:8813 magick/enhance.c
Index: magick/enhance.c
===================================================================
--- magick/enhance.c (revision 8800)
+++ magick/enhance.c (revision 8813)
@@ -3842,17 +3842,15 @@
* range.
*
* "+epsilon" is to allow a=0 without division by zero.
- *
- * "+0.5" below is to round by casting.
*/
sigmoidal_map[i]=(MagickRealType) ScaleMapToQuantum((MagickRealType)
- (MaxMap*(0.5+(uu-(u0+u1)/2.0)/(u1-u0+MagickEpsilon))+0.5));
+ (MaxMap*(0.5+(uu-(u0+u1)/2.0)/(u1-u0+MagickEpsilon))));
#else
/* Scaled sigmoidal formula: (1/(1+exp(a*(b-u))) - 1/(1+exp(a*b)))
* /
* (1/(1+exp(a*(b-1))) - 1/(1+exp(a*b)))
- *
- * "+0.5" below is to round by casting.
+ *
+ * Nicolas is still trying to figure out what the "+0.5" is for.
*/
sigmoidal_map[i]=(MagickRealType) ScaleMapToQuantum((MagickRealType)
(MaxMap*((uu-u0)/(u1-u0))+0.5));
Last edited by NicolasRobidoux on 2012-08-03T04:47:48-07:00, edited 1 time in total.
cd IM6
svn diff -r 8805:8813 Changelog
svn: 'Changelog' is not under version control
but magick/enhance.c "svn diff"s just fine.
In addition, I committed changes to Changelog myself yesterday, and it worked.
I am mystified.
Up to date Linux Mint 12 (which seems kind of unstable these days: the Ubuntu-driven updates seem to mess with Cinnamon and Firefox). Hopefully the issue will disappear when I upgrade to LM13?