Page 1 of 1

The Size of the result file is different from Imagemagick

Posted: 2017-02-13T18:24:01-07:00
by leinsr
I used Magick.Net and Imagemagick to convert the same TIFF file to a PDF file.
But the size of the result file is different.
What's the reason caused this?

ImageMagick:ImageMagick-7.0.4-7-Q16-x64
I converted the TIFF file by command line like this:
Magick test.tif ImageMagick.pdf

Magick.Net:Magick.NET-7.0.4.700-Q16-x64
I converted the TIFF by C# program like this:
using (MagickImage image = new MagickImage("test.tif"))
{
image.Write("MagickNET.pdf");
}

「ImageMagick.pdf」 is 50 bytes larger than 「MagickNET.pdf」.

Re: The Size of the result file is different from Imagemagick

Posted: 2017-02-13T19:12:23-07:00
by fmw42
Look at identify -verbose image.pdf for both pdf files and see what is different.

Re: The Size of the result file is different from Imagemagick

Posted: 2017-02-13T22:05:27-07:00
by leinsr
Thank you for your answer.

I Looked at identify -verbose image.pdf for both pdf files.
Only the following information is different.

Properties:
date:create: 2017-02-14T12:53:43+08:00
date:modify: 2017-02-14T12:53:43+08:00
Pixels per second: 377KB
User time: 2.512u
Elapsed time: 0:02.319

The information of the images is the same.

Re: The Size of the result file is different from Imagemagick

Posted: 2017-02-13T22:16:50-07:00
by fmw42
leinsr wrote:
2017-02-13T22:05:27-07:00
Thank you for your answer.

I Looked at identify -verbose image.pdf for both pdf files.
Only the following information is different.

Properties:
date:create: 2017-02-14T12:53:43+08:00
date:modify: 2017-02-14T12:53:43+08:00
Pixels per second: 377KB
User time: 2.512u
Elapsed time: 0:02.319

The information of the images is the same.

Does that mean the file sizes are now the same, since you did not list that as different?

Re: The Size of the result file is different from Imagemagick

Posted: 2017-02-13T22:36:12-07:00
by leinsr
The pdf has 100 images.
According to the results by 「identify -verbose」,
The Sizes of these images are the same.

But the sizes of the result pdfs are different.
pdf1(converted by ImageMagick):40,438,152 bytes
Image1:486KB
Image2:467KB
Image3:486KB
Image4:467KB
...
Image99:486KB
Image100:467KB

pdf2(converted by Magick.net):40,438,107 bytes
Image1:486KB
Image2:467KB
Image3:486KB
Image4:467KB
...
Image99:486KB
Image100:467KB