---
title: "JpegWriter Constructor (Stream, Int32, Boolean, Boolean)"
canonical: https://www.graphicsmill.com/docs/gm/C_Aurigma_GraphicsMill_Codecs_JpegWriter_ctor_4_26a5ea05.htm
product: "Graphics Mill"
---

# JpegWriter Constructor (Stream, Int32, Boolean, Boolean)
 
Initializes a new instance of the [JpegWriter](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_JpegWriter.htm.md) class using the specified JPEG compression settings.
 
**Namespace:** [Aurigma.GraphicsMill.Codecs](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public JpegWriter(Stream stream,int quality,bool progressive,bool useSubsampling
)
```
 
### Parameters
 
 - stream
     - Type: System.IO.Stream
The Stream to create this writer on.

 - quality
     - Type: System.Int32
The JPEG quality in range `[0, 100]`. You can change it later through the [Quality](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_JpegWriter_Quality.htm.md) property.

 - progressive
     - Type: System.Boolean
 `true` if JPEG image is progressive; otherwise, `false`. You can change it later through the [IsProgressive](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_JpegWriter_IsProgressive.htm.md) property.

 - useSubsampling
     - Type: System.Boolean
 `true` if chroma subsampling is used; otherwise, `false`. You can change it later through the [UseSubsampling](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Codecs_JpegWriter_UseSubsampling.htm.md) property.
   
## See Also

### Reference

- [JpegWriter Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_JpegWriter.htm.md)
- [JpegWriter Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Codecs_JpegWriter_ctor.htm.md)
- [Aurigma.GraphicsMill.Codecs Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Codecs.htm.md)
