Skip to content
Discussion options

You must be logged in to vote

In the next version of Magick.NET you will be able to write the file with the following code:

using (MagickImageCollection images = new MagickImageCollection())
{
    MagickImage firstFrame = new MagickImage(@"c:\dips\img1.jpg");
    firstFrame.Format = MagickFormat.Tiff;
    firstFrame.SetCompression(CompressionMethod.JPEG);
    images.Add(firstFrame);

    MagickImage secondFrame = new MagickImage(@"c:\dips\img2.tif");
    secondFrame.Format = MagickFormat.Tiff;
    secondFrame.SetCompression(CompressionMethod.Group4);
    images.Add(secondFrame);

    images.Write(@"C:\dips\out.tiff", new TiffWriteDefines
    {
        PreserveCompression = true,
    });
}

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Ovini
Comment options

@dlemstra
Comment options

@Ovini
Comment options

Answer selected by Ovini
Comment options

You must be logged in to vote
1 reply
@dlemstra
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants