mogrify

mogrify resize file name with bracket

ε祈祈猫儿з 提交于 2020-01-17 01:49:07
问题 in php it failed when resize file name that include "(" bracket. normally I do exec("mogrify -resize {$filewidth}x{$fileheight}! \"$file\""); but it don't work with filename with bracket by command line have to escape like this for working. mogrify -resize 203x126! 53v-slave-only\(2\).png how to fix it for php by exec() command note filename must use bracket. thank you. 回答1: Try to use escapeshellcmd and escapeshellarg when using functions that works with the command line. For example: <?php

Batch resize images and output images to new folder with ImageMagick

☆樱花仙子☆ 提交于 2020-01-11 15:51:11
问题 Current image folder path: public_html/images/thumbs Output image folder path: public_html/images/new-thumbs I have 10 video thumbs per video in current folder, named of image thumbs: 1-1.jpg 1-2.jpg 1-3.jpg 1-4.jpg 1-5.jpg (Resize) 1-6.jpg 1-7.jpg 1-8.jpg 1-9.jpg 1-10.jpg 2-1.jpg 2-2.jpg 2-3.jpg 2-4.jpg 2-5.jpg (Resize) 2-6.jpg 2-7.jpg 2-8.jpg 2-9.jpg 2-10.jpg I want to resize all 5th images(*-5.jpg) to the new folder. I've tried below command but no luck: mogrify -path public_html/images

Convert images which have the same names but different extensions

一笑奈何 提交于 2020-01-04 06:56:09
问题 For example, I have two files: aaa.jpg (with cat) aaa.png (with dog) As you can see, images are different, despite of their names, which are the same. I want to convert both these images to one single format. The basic attempt for this task is mogrify -format jpg *.png But it doesn't work, for obvious reasons (one folder cannot contain multiple files with the same name and extension). Also, some notes from myself. Please note, this is just example. In real life, it would be about 100-200

php exec() returning empty value

守給你的承諾、 提交于 2020-01-04 06:48:31
问题 Currently my goal is to use see the output of PHP exec() but getting an empty value. Am using firephp (firebug extension) logging and can't figure out why it is empty. full code here: https://github.com/MattMcFarland/ninja-forms-uploads-custom/blob/dev/uploads-custom.php Form here: http://www.hvac-hacks.com/?page_id=1383&preview=true&form_id=96 exec('mogrify -auto-orient -verbose -format jpg '.$dir."/".$user_file_name,$ouput); fb($output); curl_exec('mogrify -auto-orient -verbose -format jpg

Graphicsmagick gives higher filesize when compressing jpg

喜你入骨 提交于 2019-12-12 05:37:03
问题 First i took lena512color.tiff amd converted it to jpg and then i ran mogrify on it with a quality of 90%.Surprising after i decrease the quality filesize is higher.What am I doing wrong here ? gm convert lena512color.tiff lena512color.jpg # filesize = 37,043 gm mogrify -quality 90 lena512color.jpg # filesize = 58,132 回答1: By default, the output quality is set to whatever GraphicsMagick thinks the quality of the input file is. So I guess it thinks the TIFF's quality is lower than 90 and you

Need to crop+resize ~300000 files. Runtime = 4+ days. How can I speed up my bash script?

让人想犯罪 __ 提交于 2019-12-07 17:54:04
问题 I am working on creating a video timelapse. All the photos I took are .jpg images shot at 4:3 aspect ratio. 2592x1944 resolution. I want them all to be 16:9 at 1920x1080. I have written a little script to do this, but the process is not very fast. It took about 17 minutes for me to crop and resize 750 images. I have a total of about 300,000 to deal with, and will probably be doing then in batches of about 50,000. That is 18 hours 45 minutes per batch, and over 4.5 days of computing total. So

ImageMagick: how to batch combine multiple TIFF file to a single TIFF file in a directory?

ぃ、小莉子 提交于 2019-12-02 00:56:55
问题 I have 600 TIFF files in a directory, c:\temp. The file names are like: 001_1.tif, 001_2.tif, 001_3.tif 002_1.tif, 002_2.tif, 002_3.tif .... .... 200_1.tif, 200_2.tif, 200_3.tif The combined files should be placed in same directory and the files should be named like: 1_merged.tif 2_merged.tif ..... ..... 200_merged.tif I am looking for any single command-line /batch-file to do so through ImageMagick convert / mogrify command or any other command/tools. Please note the overall time taken

ImageMagick: how to batch combine multiple TIFF file to a single TIFF file in a directory?

我只是一个虾纸丫 提交于 2019-12-01 21:10:27
I have 600 TIFF files in a directory, c:\temp. The file names are like: 001_1.tif, 001_2.tif, 001_3.tif 002_1.tif, 002_2.tif, 002_3.tif .... .... 200_1.tif, 200_2.tif, 200_3.tif The combined files should be placed in same directory and the files should be named like: 1_merged.tif 2_merged.tif ..... ..... 200_merged.tif I am looking for any single command-line /batch-file to do so through ImageMagick convert / mogrify command or any other command/tools. Please note the overall time taken should not be more than 5 second. Assuming you want to combine the 600 single-page TIFFs into one single