Using Magick.NET-7.0.3.1-Q8-AnyCPU.zip I'm attempting to take an image and make it a progressive JPEG, however this isn't working as expected.
```
public static void ProcessJpegImageProgressive(Bitmap image, ref MemoryStream stream)
{
using (MagickImage mImage = new MagickImage(image))
{
mImage.Strip();
mImage.Format = MagickFormat.Pjpeg;
mImage.Interlace = Interlace.Plane;
mImage.Quality = 80;
mImage.Depth = 8;
mImage.Settings.SetDefine(MagickFormat.Jpeg, "sampling-factor", "4:2:0");
//mImage.Format = MagickFormat.Pjpeg;
//mImage.CompressionMethod = CompressionMethod.JPEG;
//mImage.SetOption(MagickFormat.Jpeg, "sampling-factor", "4x1,2x1,2x1");
mImage.Write(stream);
}
}
```
Comments: Sorry for taking this long to reply to your issue but I completely forgot about it. I cannot reproduce your issue. I get a progressive jpeg image with the following code: ```C# using (MagickImage mImage = new MagickImage("logo:")) { mImage.Strip(); // Any value other than Interlace.NoInterlace will create a progressive jpeg. mImage.Interlace = Interlace.Jpeg; mImage.Quality = 80; mImage.Depth = 8; using (FileStream stream = File.OpenWrite(@"test.jpg")) { mImage.Write(stream, new JpegWriteDefines() { SamplingFactors = new MagickGeometry[] { new MagickGeometry("4x1"), new MagickGeometry("2x1"), new MagickGeometry("2x1") } }); } } ```
```
public static void ProcessJpegImageProgressive(Bitmap image, ref MemoryStream stream)
{
using (MagickImage mImage = new MagickImage(image))
{
mImage.Strip();
mImage.Format = MagickFormat.Pjpeg;
mImage.Interlace = Interlace.Plane;
mImage.Quality = 80;
mImage.Depth = 8;
mImage.Settings.SetDefine(MagickFormat.Jpeg, "sampling-factor", "4:2:0");
//mImage.Format = MagickFormat.Pjpeg;
//mImage.CompressionMethod = CompressionMethod.JPEG;
//mImage.SetOption(MagickFormat.Jpeg, "sampling-factor", "4x1,2x1,2x1");
mImage.Write(stream);
}
}
```
Comments: Sorry for taking this long to reply to your issue but I completely forgot about it. I cannot reproduce your issue. I get a progressive jpeg image with the following code: ```C# using (MagickImage mImage = new MagickImage("logo:")) { mImage.Strip(); // Any value other than Interlace.NoInterlace will create a progressive jpeg. mImage.Interlace = Interlace.Jpeg; mImage.Quality = 80; mImage.Depth = 8; using (FileStream stream = File.OpenWrite(@"test.jpg")) { mImage.Write(stream, new JpegWriteDefines() { SamplingFactors = new MagickGeometry[] { new MagickGeometry("4x1"), new MagickGeometry("2x1"), new MagickGeometry("2x1") } }); } } ```