Pdf to jpeg with flatten option problem with jpeg size

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jime
Posts: 4
Joined: 2012-08-16T11:40:19-07:00
Authentication code: 67789

Pdf to jpeg with flatten option problem with jpeg size

Post by jime »

Hi, I'm using imagemagick into a headless server.

Without flatten option the command is working properly check output jpeg size: 700x550

Code: Select all

convert -verbose -density 200 howDoYouCompareThisMonth-0.pdf example_1.jpg
[ghostscript library] -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -dEPSCrop "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r200x200"  "-sOutputFile=/tmp/magick-XX7noyJx" "-f/tmp/magick-XX4HBSws" "-f/tmp/magick-XX9djhkn"/tmp/magick-XX7noyJx PNM 700x550 700x550+0+0 DirectClass 1.1mb 
howDoYouCompareThisMonth-0.pdf PDF 700x550 252x198+0+0 DirectClass 1.1mb 
howDoYouCompareThisMonth-0.pdf=>example_1.jpg PDF 700x550 252x198+0+0 DirectClass 1.3e+02kb
With flatten option I only see top left corner, check output jpeg size: 252x198

Code: Select all

convert -verbose -density 200 howDoYouCompareThisMonth-0.pdf -flatten example_1.jpg
[ghostscript library] -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -dEPSCrop "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r200x200"  "-sOutputFile=/tmp/magick-XXw041Jb" "-f/tmp/magick-XXaqrWDQ" "-f/tmp/magick-XXab7Uxv"/tmp/magick-XXw041Jb PNM 700x550 700x550+0+0 DirectClass 1.1mb 
howDoYouCompareThisMonth-0.pdf PDF 700x550 252x198+0+0 DirectClass 1.1mb 
howDoYouCompareThisMonth-0.pdf=>example_1.jpg PDF 700x550=>252x198 252x198+0+0 DirectClass 25kb
If I remove the flatten option the size is correct but I can't modify the background color (I want transparent instead of default white)
I tried the same command on my laptop and everything worked properly.

I tried the same commands with -debug option and here are the outputs

Code: Select all

convert -debug All -verbose -flatten -density 300 howDoYouCompareThisMonth-0.pdf -resize 860 -background green example_1.jpg
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: utility.c/ExpandFilenames/803/Configure
  Command line: convert{-debug}{All}{-verbose}{-flatten}{-density}{300}{howDoYouCompareThisMonth-0.pdf}{-resize}{860}{-background}{green}{example_1.jpg}
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/coder.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/coder.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/coder.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/coder.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/coder.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: coder.c/LoadCoderList/612/Configure
  Loading coder file "/usr/share/ImageMagick-6.2.8/config/coder.xml" ...
16:44:02 0:01 0.000u 6.2.8 Module convert[27056]: module.c/OpenModule/1063/Module
  Searching for module "PDF" using filename "pdf.la"
16:44:02 0:01 0.000u 6.2.8 Module convert[27056]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "pdf.la" ...
16:44:02 0:01 0.000u 6.2.8 Module convert[27056]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/pdf.la"
16:44:02 0:01 0.000u 6.2.8 Module convert[27056]: module.c/OpenModule/1118/Module
  Method "RegisterPDFImage" in module "PDF" at address 0x2b4e0fb1b240
16:44:02 0:01 0.000u 6.2.8 Module convert[27056]: module.c/OpenModule/1133/Module
  Method "UnregisterPDFImage" in module "PDF" at address 0x2b4e0fb1b220
16:44:02 0:01 0.000u 6.2.8 Blob convert[27056]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
16:44:02 0:01 0.000u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/magic.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/magic.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/magic.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/magic.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/magic.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: magic.c/LoadMagicList/671/Configure
  Loading magic file "/usr/share/ImageMagick-6.2.8/config/magic.xml" ...
16:44:02 0:01 0.000u 6.2.8 Blob convert[27056]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
16:44:02 0:01 0.000u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
16:44:02 0:01 0.000u 6.2.8 Blob convert[27056]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
16:44:02 0:01 0.000u 6.2.8 Resource convert[27056]: resource.c/AcquireUniqueFileResource/395/Resource
  /tmp/magick-XXLc25N1
16:44:02 0:01 0.000u 6.2.8 Resource convert[27056]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XXLc25N1
16:44:02 0:01 0.000u 6.2.8 Resource convert[27056]: resource.c/AcquireUniqueFileResource/395/Resource
  /tmp/magick-XXJZfDmp
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/delegates.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/delegates.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/delegates.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/delegates.xml"
16:44:02 0:01 0.000u 6.2.8 Configure convert[27056]: delegate.c/LoadDelegateList/1126/Configure
  Loading delegate file "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml" ...
16:44:02 0:01 0.000u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
16:44:02 0:01 0.000u 6.2.8 Resource convert[27056]: resource.c/AcquireUniqueFileResource/395/Resource
  /tmp/magick-XXmaPTVM
[ghostscript library] -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -dEPSCrop "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r300x300"  "-sOutputFile=/tmp/magick-XXmaPTVM" "-f/tmp/magick-XXJZfDmp" "-f/tmp/magick-XXLc25N1"16:44:02 0:01 0.190u 6.2.8 Coder convert[27056]: pdf.c/InvokePostscriptDelegate/170/Coder
  Ghostscript returns status -101, exit code 0
16:44:02 0:01 0.190u 6.2.8 Blob convert[27056]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
16:44:02 0:01 0.190u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
16:44:02 0:01 0.190u 6.2.8 Module convert[27056]: module.c/OpenModule/1063/Module
  Searching for module "PNM" using filename "pnm.la"
16:44:02 0:01 0.190u 6.2.8 Module convert[27056]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "pnm.la" ...
16:44:02 0:01 0.190u 6.2.8 Module convert[27056]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/pnm.la"
16:44:02 0:01 0.190u 6.2.8 Module convert[27056]: module.c/OpenModule/1118/Module
  Method "RegisterPNMImage" in module "PNM" at address 0x2b4e10a516e0
16:44:02 0:01 0.190u 6.2.8 Module convert[27056]: module.c/OpenModule/1133/Module
  Method "UnregisterPNMImage" in module "PNM" at address 0x2b4e10a51690
16:44:02 0:01 0.190u 6.2.8 Blob convert[27056]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
16:44:02 0:01 0.190u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Area: 6.6mb/6.6mb/31gb
16:44:02 0:01 0.190u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Memory: 6.6mb/6.6mb/23gb
16:44:02 0:01 0.190u 6.2.8 Cache convert[27056]: cache.c/OpenCache/3035/Cache
  open /tmp/magick-XXmaPTVM[0] (anonymous memory, 6.6mb)
/tmp/magick-XXmaPTVM PNM 1050x825 1050x825+0+0 DirectClass 2.5mb 
16:44:02 0:01 0.200u 6.2.8 Resource convert[27056]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XXJZfDmp
16:44:02 0:01 0.200u 6.2.8 Resource convert[27056]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XXmaPTVM
16:44:02 0:01 0.200u 6.2.8 Resource convert[27056]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XXLc25N1
howDoYouCompareThisMonth-0.pdf PDF 1050x825 252x198+0+0 DirectClass 2.5mb 
16:44:02 0:01 0.210u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Area: 4.4mb/4.4mb/31gb
16:44:02 0:01 0.210u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Memory: 4.4mb/11mb/23gb
16:44:02 0:01 0.210u 6.2.8 Cache convert[27056]: cache.c/OpenCache/3035/Cache
  open howDoYouCompareThisMonth-0.pdf[0] (anonymous memory, 4.4mb)
16:44:02 0:01 0.210u 6.2.8 Cache convert[27056]: cache.c/CloneMemoryToMemoryPixels/1534/Cache
  memory => memory
16:44:02 0:01 0.210u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Area: 5.4mb/5.4mb/31gb
16:44:02 0:01 0.210u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Memory: 5.4mb/16mb/23gb
16:44:02 0:01 0.210u 6.2.8 Cache convert[27056]: cache.c/OpenCache/3035/Cache
  open howDoYouCompareThisMonth-0.pdf[0] (anonymous memory, 5.4mb)
16:44:02 0:01 0.210u 6.2.8 Cache convert[27056]: cache.c/CloneMemoryToMemoryPixels/1534/Cache
  memory => memory
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][4x676+0+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+0+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][5x676+0+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+1+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+0+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+2+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+1+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+2+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+4+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+4+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+8+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+8+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+16+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+16+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+32+0]
16:44:02 0:01 0.290u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+32+0]
16:44:02 0:01 0.300u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+64+0]
16:44:02 0:01 0.300u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+64+0]
16:44:02 0:01 0.300u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+128+0]
16:44:02 0:01 0.310u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+128+0]
16:44:02 0:01 0.320u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+256+0]
16:44:02 0:01 0.320u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+256+0]
16:44:02 0:01 0.330u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+384+0]
16:44:02 0:01 0.340u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+384+0]
16:44:02 0:01 0.350u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+512+0]
16:44:02 0:01 0.360u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+512+0]
16:44:02 0:01 0.360u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+640+0]
16:44:02 0:01 0.370u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+640+0]
16:44:02 0:01 0.380u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+896+0]
16:44:02 0:01 0.390u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+768+0]
16:44:02 0:01 0.400u 6.2.8 Cache convert[27056]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+1024+0]
16:44:02 0:01 0.400u 6.2.8 Cache convert[27056]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+859+0]
16:44:02 0:01 0.400u 6.2.8 Resource convert[27056]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 5.4mb/11mb/23gb
16:44:02 0:01 0.400u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy howDoYouCompareThisMonth-0.pdf[0]
16:44:02 0:01 0.410u 6.2.8 Resource convert[27056]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 6.6mb/4.4mb/23gb
16:44:02 0:01 0.410u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy /tmp/magick-XXmaPTVM[0]
16:44:02 0:01 0.410u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/colors.xml"
16:44:02 0:01 0.410u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/colors.xml"
16:44:02 0:01 0.410u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/colors.xml"
16:44:02 0:01 0.410u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/colors.xml"
16:44:02 0:01 0.410u 6.2.8 Configure convert[27056]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/colors.xml"
16:44:02 0:01 0.410u 6.2.8 Configure convert[27056]: color.c/LoadColorList/2298/Configure
  Loading color file "/usr/lib64/ImageMagick-6.2.8/config/colors.xml" ...
16:44:02 0:01 0.420u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Area: 2.6e+02kb/2.6e+02kb/31gb
16:44:02 0:01 0.420u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Memory: 2.6e+02kb/4.7mb/23gb
16:44:02 0:01 0.420u 6.2.8 Cache convert[27056]: cache.c/OpenCache/3035/Cache
  open howDoYouCompareThisMonth-0.pdf[0] (anonymous memory, 2.6e+02kb)
16:44:02 0:01 0.420u 6.2.8 Cache convert[27056]: cache.c/CloneMemoryToMemoryPixels/1534/Cache
  memory => memory
16:44:02 0:01 0.420u 6.2.8 Resource convert[27056]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 4.4mb/2.6e+02kb/23gb
16:44:02 0:01 0.420u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy howDoYouCompareThisMonth-0.pdf[0]
16:44:02 0:01 0.420u 6.2.8 Module convert[27056]: module.c/OpenModule/1063/Module
  Searching for module "JPEG" using filename "jpeg.la"
16:44:02 0:01 0.420u 6.2.8 Module convert[27056]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "jpeg.la" ...
16:44:02 0:01 0.420u 6.2.8 Module convert[27056]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la"
16:44:02 0:01 0.420u 6.2.8 Module convert[27056]: module.c/OpenModule/1118/Module
  Method "RegisterJPEGImage" in module "JPEG" at address 0x2b4e10c99e60
16:44:02 0:01 0.420u 6.2.8 Module convert[27056]: module.c/OpenModule/1133/Module
  Method "UnregisterJPEGImage" in module "JPEG" at address 0x2b4e10c99e40
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1644/Coder
  Image resolution: 300,300
16:44:02 0:01 0.420u 6.2.8 Resource convert[27056]: resource.c/AcquireMagickResource/216/Resource
  Area: 33kb/33kb/31gb
16:44:02 0:01 0.420u 6.2.8 Resource convert[27056]: resource.c/RelinquishMagickResource/801/Resource
  Area: 33kb/33kb/31gb
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1689/Coder
  Interlace: non-progressive
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1711/Coder
  Quality: 100
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1803/Coder
  Storage class: DirectClass
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1805/Coder
  Depth: 16
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1811/Coder
  Number of colors: unspecified
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1813/Coder
  JPEG data precision: 8
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1867/Coder
   Image colorspace is RGB
16:44:02 0:01 0.420u 6.2.8 Coder convert[27056]: jpeg.c/WriteJPEGImage/1869/Coder
  Sampling factors: 2x2,1x1,1x1
howDoYouCompareThisMonth-0.pdf=>example_1.jpg PDF 1050x825=>206x162 206x162+0+0 DirectClass 24kb 
16:44:02 0:01 0.430u 6.2.8 Resource convert[27056]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 2.6e+02kb/0/23gb
16:44:02 0:01 0.430u 6.2.8 Cache convert[27056]: cache.c/DestroyCacheInfo/1763/Cache
  destroy howDoYouCompareThisMonth-0.pdf[0]

Code: Select all

convert -debug All -verbose -density 300 howDoYouCompareThisMonth-0.pdf -resize 860 -background green example_1.jpg
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: utility.c/ExpandFilenames/803/Configure
  Command line: convert{-debug}{All}{-verbose}{-density}{300}{howDoYouCompareThisMonth-0.pdf}{-resize}{860}{-background}{green}{example_1.jpg}
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/coder.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/coder.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/coder.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/coder.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/coder.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: coder.c/LoadCoderList/612/Configure
  Loading coder file "/usr/share/ImageMagick-6.2.8/config/coder.xml" ...
17:56:35 0:01 0.000u 6.2.8 Module convert[5313]: module.c/OpenModule/1063/Module
  Searching for module "PDF" using filename "pdf.la"
17:56:35 0:01 0.000u 6.2.8 Module convert[5313]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "pdf.la" ...
17:56:35 0:01 0.000u 6.2.8 Module convert[5313]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/pdf.la"
17:56:35 0:01 0.000u 6.2.8 Module convert[5313]: module.c/OpenModule/1118/Module
  Method "RegisterPDFImage" in module "PDF" at address 0x2b9e9b5e6240
17:56:35 0:01 0.000u 6.2.8 Module convert[5313]: module.c/OpenModule/1133/Module
  Method "UnregisterPDFImage" in module "PDF" at address 0x2b9e9b5e6220
17:56:35 0:01 0.000u 6.2.8 Blob convert[5313]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:56:35 0:01 0.000u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/magic.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/magic.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/magic.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/magic.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/magic.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: magic.c/LoadMagicList/671/Configure
  Loading magic file "/usr/share/ImageMagick-6.2.8/config/magic.xml" ...
17:56:35 0:01 0.000u 6.2.8 Blob convert[5313]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:56:35 0:01 0.000u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
17:56:35 0:01 0.000u 6.2.8 Blob convert[5313]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:56:35 0:01 0.000u 6.2.8 Resource convert[5313]: resource.c/AcquireUniqueFileResource/395/Resource
  /tmp/magick-XX2eI2da
17:56:35 0:01 0.000u 6.2.8 Resource convert[5313]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XX2eI2da
17:56:35 0:01 0.000u 6.2.8 Resource convert[5313]: resource.c/AcquireUniqueFileResource/395/Resource
  /tmp/magick-XXaEBgAd
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/delegates.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/delegates.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/delegates.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/delegates.xml"
17:56:35 0:01 0.000u 6.2.8 Configure convert[5313]: delegate.c/LoadDelegateList/1126/Configure
  Loading delegate file "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml" ...
17:56:35 0:01 0.000u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
17:56:35 0:01 0.000u 6.2.8 Resource convert[5313]: resource.c/AcquireUniqueFileResource/395/Resource
  /tmp/magick-XXMEjAWg
[ghostscript library] -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -dEPSCrop "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r300x300"  "-sOutputFile=/tmp/magick-XXMEjAWg" "-f/tmp/magick-XXaEBgAd" "-f/tmp/magick-XX2eI2da"17:56:36 0:01 0.180u 6.2.8 Coder convert[5313]: pdf.c/InvokePostscriptDelegate/170/Coder
  Ghostscript returns status -101, exit code 0
17:56:36 0:01 0.180u 6.2.8 Blob convert[5313]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:56:36 0:01 0.180u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy 
17:56:36 0:01 0.180u 6.2.8 Module convert[5313]: module.c/OpenModule/1063/Module
  Searching for module "PNM" using filename "pnm.la"
17:56:36 0:01 0.180u 6.2.8 Module convert[5313]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "pnm.la" ...
17:56:36 0:01 0.180u 6.2.8 Module convert[5313]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/pnm.la"
17:56:36 0:01 0.180u 6.2.8 Module convert[5313]: module.c/OpenModule/1118/Module
  Method "RegisterPNMImage" in module "PNM" at address 0x2b9e9c51c6e0
17:56:36 0:01 0.180u 6.2.8 Module convert[5313]: module.c/OpenModule/1133/Module
  Method "UnregisterPNMImage" in module "PNM" at address 0x2b9e9c51c690
17:56:36 0:01 0.180u 6.2.8 Blob convert[5313]: blob.c/OpenBlob/2021/Blob
    read 4096 magic header bytes
17:56:36 0:01 0.180u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Area: 6.6mb/6.6mb/31gb
17:56:36 0:01 0.180u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Memory: 6.6mb/6.6mb/23gb
17:56:36 0:01 0.180u 6.2.8 Cache convert[5313]: cache.c/OpenCache/3035/Cache
  open /tmp/magick-XXMEjAWg[0] (anonymous memory, 6.6mb)
/tmp/magick-XXMEjAWg PNM 1050x825 1050x825+0+0 DirectClass 2.5mb 
17:56:36 0:01 0.190u 6.2.8 Resource convert[5313]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XXaEBgAd
17:56:36 0:01 0.190u 6.2.8 Resource convert[5313]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XXMEjAWg
17:56:36 0:02 0.190u 6.2.8 Resource convert[5313]: resource.c/RelinquishUniqueFileResource/835/Resource
  /tmp/magick-XX2eI2da
howDoYouCompareThisMonth-0.pdf PDF 1050x825 252x198+0+0 DirectClass 2.5mb 0.000u 0:02
17:56:36 0:02 0.190u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Area: 4.4mb/4.4mb/31gb
17:56:36 0:02 0.190u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Memory: 4.4mb/11mb/23gb
17:56:36 0:02 0.190u 6.2.8 Cache convert[5313]: cache.c/OpenCache/3035/Cache
  open howDoYouCompareThisMonth-0.pdf[0] (anonymous memory, 4.4mb)
17:56:36 0:02 0.190u 6.2.8 Cache convert[5313]: cache.c/CloneMemoryToMemoryPixels/1534/Cache
  memory => memory
17:56:36 0:02 0.200u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Area: 5.4mb/5.4mb/31gb
17:56:36 0:02 0.200u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Memory: 5.4mb/16mb/23gb
17:56:36 0:02 0.200u 6.2.8 Cache convert[5313]: cache.c/OpenCache/3035/Cache
  open howDoYouCompareThisMonth-0.pdf[0] (anonymous memory, 5.4mb)
17:56:36 0:02 0.200u 6.2.8 Cache convert[5313]: cache.c/CloneMemoryToMemoryPixels/1534/Cache
  memory => memory
17:56:36 0:02 0.260u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][4x676+0+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+0+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][5x676+0+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+1+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+0+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+2+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+1+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+2+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+4+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+4+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+8+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+8+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+16+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+16+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+32+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+32+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+64+0]
17:56:36 0:02 0.270u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+64+0]
17:56:36 0:02 0.280u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+128+0]
17:56:36 0:02 0.280u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+128+0]
17:56:36 0:02 0.280u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+256+0]
17:56:36 0:02 0.290u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+256+0]
17:56:36 0:02 0.290u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+384+0]
17:56:36 0:02 0.300u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+384+0]
17:56:36 0:02 0.300u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+512+0]
17:56:36 0:02 0.310u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+512+0]
17:56:36 0:02 0.310u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][8x676+640+0]
17:56:36 0:02 0.320u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+640+0]
17:56:36 0:02 0.330u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+896+0]
17:56:36 0:02 0.340u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+768+0]
17:56:36 0:02 0.340u 6.2.8 Cache convert[5313]: cache.c/ReadCachePixels/3466/Cache
  howDoYouCompareThisMonth-0.pdf[0][7x676+1024+0]
17:56:36 0:02 0.350u 6.2.8 Cache convert[5313]: cache.c/WriteCachePixels/4378/Cache
  howDoYouCompareThisMonth-0.pdf[0][1x676+859+0]
17:56:36 0:02 0.350u 6.2.8 Resource convert[5313]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 5.4mb/11mb/23gb
17:56:36 0:02 0.350u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy howDoYouCompareThisMonth-0.pdf[0]
17:56:36 0:02 0.350u 6.2.8 Resource convert[5313]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 6.6mb/4.4mb/23gb
17:56:36 0:02 0.350u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy /tmp/magick-XXMEjAWg[0]
17:56:36 0:02 0.350u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/colors.xml"
17:56:36 0:02 0.350u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/colors.xml"
17:56:36 0:02 0.350u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/colors.xml"
17:56:36 0:02 0.350u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/colors.xml"
17:56:36 0:02 0.350u 6.2.8 Configure convert[5313]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/root/.magick/colors.xml"
17:56:36 0:02 0.350u 6.2.8 Configure convert[5313]: color.c/LoadColorList/2298/Configure
  Loading color file "/usr/lib64/ImageMagick-6.2.8/config/colors.xml" ...
17:56:36 0:02 0.350u 6.2.8 Module convert[5313]: module.c/OpenModule/1063/Module
  Searching for module "JPEG" using filename "jpeg.la"
17:56:36 0:02 0.350u 6.2.8 Module convert[5313]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "jpeg.la" ...
17:56:36 0:02 0.350u 6.2.8 Module convert[5313]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la"
17:56:36 0:02 0.350u 6.2.8 Module convert[5313]: module.c/OpenModule/1118/Module
  Method "RegisterJPEGImage" in module "JPEG" at address 0x2b9e9c722e60
17:56:36 0:02 0.350u 6.2.8 Module convert[5313]: module.c/OpenModule/1133/Module
  Method "UnregisterJPEGImage" in module "JPEG" at address 0x2b9e9c722e40
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1644/Coder
  Image resolution: 300,300
17:56:36 0:02 0.350u 6.2.8 Resource convert[5313]: resource.c/AcquireMagickResource/216/Resource
  Area: 5.7e+02kb/5.7e+02kb/31gb
17:56:36 0:02 0.350u 6.2.8 Resource convert[5313]: resource.c/RelinquishMagickResource/801/Resource
  Area: 5.7e+02kb/5.7e+02kb/31gb
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1689/Coder
  Interlace: non-progressive
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1711/Coder
  Quality: 100
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1803/Coder
  Storage class: DirectClass
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1805/Coder
  Depth: 16
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1811/Coder
  Number of colors: unspecified
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1813/Coder
  JPEG data precision: 8
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1867/Coder
   Image colorspace is RGB
17:56:36 0:02 0.350u 6.2.8 Coder convert[5313]: jpeg.c/WriteJPEGImage/1869/Coder
  Sampling factors: 2x2,1x1,1x1
howDoYouCompareThisMonth-0.pdf=>example_1.jpg PDF 1050x825=>860x676 206x162+0+0 DirectClass 1.9e+02kb 
17:56:36 0:02 0.380u 6.2.8 Resource convert[5313]: resource.c/RelinquishMagickResource/801/Resource
  Memory: 4.4mb/0/23gb
17:56:36 0:02 0.380u 6.2.8 Cache convert[5313]: cache.c/DestroyCacheInfo/1763/Cache
  destroy howDoYouCompareThisMonth-0.pdf[0]
edit: here is the system information

Code: Select all

uname -a
Linux qa-cassandra-node01 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by fmw42 »

what are the version of IM? what are the ghostscript versions? it may be a version issue or the ghostscript delegate setup in the delegates.xml file or the version of Ghostscript.

If you pdf file has transparency, having -flatten should not matter, besides you would need to specify -background none or transparent for -flatten to use it, though I don't think that should be needed.

What is the verbose information from your PDF file?

identify -verbose image.pdf
jime
Posts: 4
Joined: 2012-08-16T11:40:19-07:00
Authentication code: 67789

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by jime »

fmw42 wrote:what are the version of IM? what are the ghostscript versions? it may be a version issue or the ghostscript delegate setup in the delegates.xml file or the version of Ghostscript.
rpm -qa ImageMagick\*
ImageMagick-6.2.8.0-15.el5_8
ImageMagick-6.2.8.0-15.el5_8

rpm -qa ghostscript\*
ghostscript-fonts-5.50-13.1.1
ghostscript-8.70-14.el5
ghostscript-8.70-14.el5
fmw42 wrote:If you pdf file has transparency, having -flatten should not matter, besides you would need to specify -background none or transparent for -flatten to use it, though I don't think that should be needed.
my pdf has not transparency I'm using -flatten as the only way I found to use -background option otherwise it doesn't work. I read that from this link: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642098
fmw42 wrote:What is the verbose information from your PDF file?
identify -verbose image.pdf

Code: Select all

identify -verbose howDoYouCompareThisMonth-0.pdf 
Image: howDoYouCompareThisMonth-0.pdf
  Format: PDF (Portable Document Format)
  Class: DirectClass
  Geometry: 252x198
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Channel depth:
    Red: 8-bits
    Green: 8-bits
    Blue: 8-bits
  Channel statistics:
    Red:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 208.532 (0.817772)
      Standard deviation: 76.4999 (0.3)
    Green:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 228.881 (0.897571)
      Standard deviation: 43.5712 (0.170867)
    Blue:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 200.662 (0.78691)
      Standard deviation: 82.8168 (0.324772)
  Colors: 1530
  Rendering intent: Undefined
  Resolution: 72x72
  Units: Undefined
  Filesize: 1.5e+02kb
  Interlace: None
  Background color: white
  Border color: #DFDFDF
  Matte color: grey74
  Page geometry: 252x198+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Undefined
  Orientation: Undefined
  Comment:  Image generated by GPL Ghostscript (device=pnmraw)

  Signature: b57d300d5b6142d43c9e4baeeee2544b8ce52f303ece8162134ea82c1cbe5f75
  Tainted: False
  Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
I can also upload the pdf file if that helps.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by fmw42 »

Your versions of IM are ancient at 6.2.8 (over 500 versions old). Ghostscript is also old.

I do not understand how adding -flatten would introduce transparency. You would need to use -transparent white in my opinion. But perhaps I do not understand something about IM and -flatten.

Note that if your image was already transparent then you could flatten it against any color you want. Without transparency, -flatten should have no affect on the background color and I do not see how it would change your output size. Furthermore, you cannot set -background to transparent and expect -flatten to make it transparent. The only way I know would be to use -transparent white, if your background is already white. However, that will leave behind aliased results. To anti-alias, you would need to create a mask vie -threshold and then blur the edges of the mask.

I do not see your uploaded image! Where is it? I see no link. You have to upload your pdf file to some free image hosting service and put a link to there in your post here.

In general, you need to set the background color before you use -flatten.
jime
Posts: 4
Joined: 2012-08-16T11:40:19-07:00
Authentication code: 67789

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by jime »

those versions are what yum put for me. I'll try to manually update it and let you know.
thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by fmw42 »

jime wrote:those versions are what yum put for me. I'll try to manually update it and let you know.
thanks

Your PDF file is only 252x198. That must be the size of some image that is imbedded in the image. But the PDF may have a bounding box that is bigger. Your flatten is probably ignoring the bounding box or vice versa so one or the other is not producing the right output.


identify -verbose howDoYouCompareThisMonth-0.pdf
Image: howDoYouCompareThisMonth-0.pdf
Format: PDF (Portable Document Format)
Class: DirectClass
Geometry: 252x198


Well before you go to the trouble to change IM versions, why don't you post your pdf file and let us try to see what happens?

P.S. I did some research on the archives and find that -flatten may be needed for PDF files that have transparency in them so that the output has better quality. But I am not sure what -flatten may be doing with any such bounding box defined by the pdf. So if you can provide a link to your image, I can try to see what is going on or at least confirm that it is still happening with the current IM release.
jime
Posts: 4
Joined: 2012-08-16T11:40:19-07:00
Authentication code: 67789

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by jime »

You are right my pdf is just an image (I generated it with R script and now I want the jpg version of it).
Here is the link: http://www.4shared.com/office/KaKtlkCj/ ... furl=d1url

I'm compiling IM from sources to use the latest version.

Thanks for your help
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pdf to jpeg with flatten option problem with jpeg size

Post by fmw42 »

I cannot download the file without logging in. If I try to use the posted image, it is jpg.
Post Reply