Linux imagemagick convert mpf to gif4/14/2023 Using Ghostscript to create from the same page grayscale PNGs, piping Ghostscript's output to ImageMagick's convert in order to get GIFs: time for i in $(seq -w 1 100) do 'Comfortably' using ImageMagick's convert to directly produce GIF: time for i in $(seq -w 1 100) do I run these commands in concurrently parallel, so both should have had to deal with the same overall system load, making the results better comparable: I did run a very, very un-scientific 'benchmark', running the following two commands 100 time each, which convert the randomly picked page 333 of the official PDF specification (ISO version for PDF-1.7) to GIF, measuring the time consumed. You can see how ImageMagick calls Ghostscript (and which parameters it uses for the call - look for a printed line on stderr containing gs, gsx or gswin32c or gswin64c) by running for example: convert -verbose some.pdf some.gif If you required GIF (which you don't seem to), you need ImageMagick for post-processing the raster output of Ghostscript to GIF. The only disadvantage is: Ghostscript cannot produce GIF. (Sometimes it may be required to add some fine-tuning and post-processing manipulations to the raster image data that Ghostscript generated - but that doesn't seem to be the case for you.) If you run Ghostscript via ImageMagick that's a level of indirection which isn't always required. So it's faster and also gives you more direct control over the conversion parameters. The advantages are: you don't need to have ImageMagick involved. Ghostscript can directly convert PDF/PostScript input to TIFF/TIF/TIFFg4, JPEG, PBM, PCX, PNG, PNM, PPM, BMP raster image output. Since you have a working ImageMagick already installed, that means Ghostscript is also there: because ImageMagick cannot convert PDF or PostScript to raster images all by its own - it has to call Ghostscript as its delegate to do this anyway.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |