Revision: 20106
          http://sourceforge.net/p/jmol/code/20106
Author:   hansonr
Date:     2014-11-11 19:53:36 +0000 (Tue, 11 Nov 2014)
Log Message:
-----------


Modified Paths:
--------------
    trunk/Jmol/src/javajs/img/GifEncoder.java

Modified: trunk/Jmol/src/javajs/img/GifEncoder.java
===================================================================
--- trunk/Jmol/src/javajs/img/GifEncoder.java   2014-11-11 13:04:09 UTC (rev 
20105)
+++ trunk/Jmol/src/javajs/img/GifEncoder.java   2014-11-11 19:53:36 UTC (rev 
20106)
@@ -628,14 +628,14 @@
     // http://rsb.info.nih.gov/ij/plugins/download/Color_Space_Converter.java
     if (xyz == null)
       xyz = new P3();
-    xyz.x = srgb(rgb.x);
-    xyz.y = srgb(rgb.y);
-    xyz.z = srgb(rgb.z);
+    xyz.x = sxyz(rgb.x);
+    xyz.y = sxyz(rgb.y);
+    xyz.z = sxyz(rgb.z);
     rgb2xyz.rotate(xyz);
     return xyz;
   }
 
-  private float srgb(float x) {
+  private float sxyz(float x) {
     x /= 255;
     return (float) (x <= 0.04045 ? x / 12.92 : Math.pow(((x + 0.055) / 1.055),
         2.4)) * 100;
@@ -649,13 +649,13 @@
     rgb.setT(xyz);
     rgb.scale(0.01f);
     xyz2rgb.rotate(rgb);
-    rgb.x = clamp(sxyz(rgb.x), 0, 255);
-    rgb.y = clamp(sxyz(rgb.y), 0, 255);
-    rgb.z = clamp(sxyz(rgb.z), 0, 255);
+    rgb.x = clamp(srgb(rgb.x), 0, 255);
+    rgb.y = clamp(srgb(rgb.y), 0, 255);
+    rgb.z = clamp(srgb(rgb.z), 0, 255);
     return rgb;
   }
 
-  private float sxyz(float x) {
+  private float srgb(float x) {
     return (float) (x > 0.0031308f ? (1.055 * Math.pow(x, 1.0 / 2.4)) - 0.055
         : x * 12.92) * 255;
   }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to