Page 1 of 1

Generation Ptiffs

Posted: 2016-11-16T03:31:24-07:00
by D_Joling
Dear All,

i'm currently making an application that can convert any jpeg into a Tiled Pyramidal tiff.
with the commandline i can just use this command:
convert source.jpg -define tiff:tile-geometry=256x256 -quality 80 -compress jpeg 'ptif:output.tif'

But when i use my code in C#:

using (var img= new MagickImage(source))
{
img.Settings.SetDefine(MagickFormat.Tiff, "tile-geometry", "256x256");
img.Quality = quality;
img.CompressionMethod = CompressionMethod.jpeg;
imageJpg.Format = MagickFormat.Ptif;
imageJpg.Write(target);
}


My quality doesnt affect quality and size of the image.
I debugged my application and the different values for the quality is set correctly.

Can anyone point me into the right direction ?

many thanks,

Daan

Re: Generation Ptiffs

Posted: 2016-11-20T02:51:22-07:00
by dlemstra
You will need to set the CompressionMethod of img.Settings instead. These settings are used when the image is written.