The Size of the result file is different from Imagemagick

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
leinsr
Posts: 4
Joined: 2017-02-13T02:50:02-07:00
Authentication code: 1151

The Size of the result file is different from Imagemagick

Post 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」.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 »

Look at identify -verbose image.pdf for both pdf files and see what is different.
leinsr
Posts: 4
Joined: 2017-02-13T02:50:02-07:00
Authentication code: 1151

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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?
leinsr
Posts: 4
Joined: 2017-02-13T02:50:02-07:00
Authentication code: 1151

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

Post 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
Post Reply