Generation Ptiffs

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
D_Joling
Posts: 1
Joined: 2016-11-16T03:21:18-07:00
Authentication code: 1151

Generation Ptiffs

Post by D_Joling » 2016-11-16T03:31:24-07:00

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

User avatar
dlemstra
Posts: 1568
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Generation Ptiffs

Post by dlemstra » 2016-11-20T02:51:22-07:00

You will need to set the CompressionMethod of img.Settings instead. These settings are used when the image is written.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Post Reply