# Class JpgEncoder

java.lang.Object
javajs.img.ImageEncoder
javajs.img.JpgEncoder

All Implemented Interfaces:
  `GenericImageEncoder`

Direct Known Subclasses:
  `Jpg64Encoder`

public class JpgEncoder extends ImageEncoder
JpegEncoder - The JPEG main program which performs a jpeg compression of an image. A system to allow the full Jmol state -- regardless of length -- to be encoded in a set of APP1 (FFE1) tags. But we have to be careful about line ends for backward compatibility. This solution is not 100% effective, because some data lines may in principle be Very large and may not contain new lines for more than 65500 characters, But that would be very unusual. Perhaps a huge data set loaded from a string. Introduced in Jmol 12.1.36. Bob Hanson See org.com.obrador.license.txt

## Field Summary

Fields
Modifier and Type
Field
Description
`protected int`
`defaultQuality`

### Fields inherited from class ImageEncoder

`date, doClose, dpi, height, logging, out, pixels, quality, width`

## Constructor Summary

Constructors
Constructor
Description
`JpgEncoder()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`generate()`
`protected void`
`setParams(Map<String,Object> params)`

### Methods inherited from class ImageEncoder

`close, createImage, putByte, putString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### defaultQuality

protected int defaultQuality

## Constructor Details

### JpgEncoder

public JpgEncoder()

## Method Details

### setParams

protected void setParams(Map<String,Object> params)

Specified by:
  `setParams` in class `ImageEncoder`

### generate

protected void generate() throws IOException

Specified by:
  `generate` in class `ImageEncoder`
Throws:
  `IOException`