Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / src / javajs / img / Jpg64Encoder.java
index 237b7e2..796972f 100644 (file)
@@ -1,64 +1,64 @@
-// Version 1.0a\r
-// Copyright (C) 1998, James R. Weeks and BioElectroMech.\r
-// Visit BioElectroMech at www.obrador.com.  Email James@obrador.com.\r
-\r
-// See license.txt for details about the allowed used of this software.\r
-// This software is based in part on the work of the Independent JPEG Group.\r
-// See IJGreadme.txt for details about the Independent JPEG Group's license.\r
-\r
-// This encoder is inspired by the Java Jpeg encoder by Florian Raemy,\r
-// studwww.eurecom.fr/~raemy.\r
-// It borrows a great deal of code and structure from the Independent\r
-// Jpeg Group's Jpeg 6a library, Copyright Thomas G. Lane.\r
-// See license.txt for details \r
-\r
-/*\r
- * JpegEncoder and its associated classes are Copyright (c) 1998, James R. Weeks and BioElectroMech\r
- * see(Jmol/src/com/obrador/license.txt)\r
- * \r
- * javajs.img.JpegEncoder.java was adapted by Bob Hanson\r
- * for Jmol in the following ways:\r
- * \r
- * 1) minor coding efficiencies were made in some for() loops.\r
- * 2) methods not used by Jmol were commented out\r
- * 3) method and variable signatures were modified to provide \r
- *    more appropriate method privacy.\r
- * 4) additions for Java2Script compatibility \r
- * \r
- * Original files are maintained in the Jmol.src.com.obrador package, but\r
- * these original files are not distributed with Jmol.\r
- *   \r
-*/\r
-\r
-package javajs.img;\r
-\r
-import java.io.IOException;\r
-import java.util.Map;\r
-\r
-import javajs.util.Base64;\r
-import javajs.util.OC;\r
-\r
-\r
-public class Jpg64Encoder extends JpgEncoder {\r
-\r
-  private OC outTemp;\r
-\r
-  @Override\r
-  protected void setParams(Map<String, Object> params) {\r
-    defaultQuality = 75;\r
-    outTemp = (OC) params.remove("outputChannelTemp");\r
-    super.setParams(params);\r
-  }\r
-\r
-  @Override\r
-  protected void generate() throws IOException {\r
-    OC out0 = out;\r
-    out = outTemp;\r
-    super.generate();\r
-    byte[] bytes = Base64.getBytes64(out.toByteArray());\r
-    outTemp = null;\r
-    out = out0;\r
-    out.write(bytes, 0, bytes.length);\r
-  }\r
-\r
-}\r
+// Version 1.0a
+// Copyright (C) 1998, James R. Weeks and BioElectroMech.
+// Visit BioElectroMech at www.obrador.com.  Email James@obrador.com.
+
+// See license.txt for details about the allowed used of this software.
+// This software is based in part on the work of the Independent JPEG Group.
+// See IJGreadme.txt for details about the Independent JPEG Group's license.
+
+// This encoder is inspired by the Java Jpeg encoder by Florian Raemy,
+// studwww.eurecom.fr/~raemy.
+// It borrows a great deal of code and structure from the Independent
+// Jpeg Group's Jpeg 6a library, Copyright Thomas G. Lane.
+// See license.txt for details 
+
+/*
+ * JpegEncoder and its associated classes are Copyright (c) 1998, James R. Weeks and BioElectroMech
+ * see(Jmol/src/com/obrador/license.txt)
+ * 
+ * javajs.img.JpegEncoder.java was adapted by Bob Hanson
+ * for Jmol in the following ways:
+ * 
+ * 1) minor coding efficiencies were made in some for() loops.
+ * 2) methods not used by Jmol were commented out
+ * 3) method and variable signatures were modified to provide 
+ *    more appropriate method privacy.
+ * 4) additions for Java2Script compatibility 
+ * 
+ * Original files are maintained in the Jmol.src.com.obrador package, but
+ * these original files are not distributed with Jmol.
+ *   
+*/
+
+package javajs.img;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javajs.util.Base64;
+import javajs.util.OC;
+
+
+public class Jpg64Encoder extends JpgEncoder {
+
+  private OC outTemp;
+
+  @Override
+  protected void setParams(Map<String, Object> params) {
+    defaultQuality = 75;
+    outTemp = (OC) params.remove("outputChannelTemp");
+    super.setParams(params);
+  }
+
+  @Override
+  protected void generate() throws IOException {
+    OC out0 = out;
+    out = outTemp;
+    super.generate();
+    byte[] bytes = Base64.getBytes64(out.toByteArray());
+    outTemp = null;
+    out = out0;
+    out.write(bytes, 0, bytes.length);
+  }
+
+}