If none of the specific sub-forums seem right for your thread, ask here.
shirish
Posts: 845 Joined: 2010-12-08 12:59
#1
Post
by shirish » 2022-04-03 05:52
I had got this answer and for a time it worked -
https://unix.stackexchange.com/question ... g-imagemag
Can somebody tell me what am I doing wrong?
Code: Select all
$ mogrify -path /home/shirish/output_directory -monitor -quality 70 -trim -resize '>'600x400 *.jpg
I get this error at the end -
Code: Select all
mogrify-im6.q16: unable to open image `/home/shirish/output_directory/pmc-1.jpg': No such file or directory @ error/blob.c/OpenBlob/2924.
Code: Select all
$ mogrify --version
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26
sunrat
Administrator
Posts: 7275 Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 127 times
Been thanked: 634 times
#2
Post
by sunrat » 2022-04-03 07:01
Mogrify overwrites the original. The error seems to mean your originals are not in "output_directory". Use convert instead:
convert <source> options <destination>
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
shirish
Posts: 845 Joined: 2010-12-08 12:59
#3
Post
by shirish » 2022-04-04 04:55
sunrat wrote: ↑ 2022-04-03 07:01
Mogrify overwrites the original. The error seems to mean your originals are not in "output_directory". Use convert instead:
convert <source> options <destination>
I actually copied the originals in ouput_directory and still get the same error.
Code: Select all
~/Pictures/output_directory$ ls
pmc-1.jpg pmc-2.jpg
Code: Select all
$ mogrify -path /home/shirish/output_directory -monitor -quality 70 -trim -resize '>'600x400 *.jpg
load image[pmc-1.jpg]: 2321 of 2322, 100% complete
Crop/Image//home/shirish/output_directory[pmc-1.jpg]: 2321 of 2322, 100% complete
Resize/Image//home/shirish/output_directory[pmc-1.jpg]: 937 of 938, 100% complete
load image[pmc-2.jpg]: 2321 of 2322, 100% complete
Crop/Image//home/shirish/output_directory[pmc-2.jpg]: 2321 of 2322, 100% complete
Resize/Image//home/shirish/output_directory[pmc-2.jpg]: 937 of 938, 100% complete
load image[warning-from-landlord.jpg]: 2321 of 2322, 100% complete
mogrify-im6.q16: unable to open image `/home/shirish/output_directory/pmc-1.jpg': No such file or directory @ error/blob.c/OpenBlob/2924.
I am baffled
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26
shirish
Posts: 845 Joined: 2010-12-08 12:59
#4
Post
by shirish » 2022-04-04 05:00
I even tried what you said -
Code: Select all
$ convert /home/shirish/input_directory/*.jpg -monitor -quality 70 -trim -resize '>'600x400 *.jpg /home/shirish/output_directory/*.jpg
load image[pmc-1.jpg]: 2321 of 2322, 100% complete
load image[pmc-2.jpg]: 2321 of 2322, 100% complete
load image[warning-from-landlord.jpg]: 2321 of 2322, 100% complete
crop image[pmc-1.jpg]: 2321 of 2322, 100% complete
resize image[pmc-1.jpg]: 937 of 938, 100% complete
crop image[pmc-2.jpg]: 2321 of 2322, 100% complete
resize image[pmc-2.jpg]: 937 of 938, 100% complete
Write/Image//home/shirish/output_directory[*-2.jpg]: 2 of 3, 100% complete
convert-im6.q16: unable to open image `/home/shirish/input_directory/*.jpg': No such file or directory @ error/blob.c/OpenBlob/2924.
As can be seen it is the same issue. Pehraps one of the options has an issue. I have no clue what is wrong here
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26
sunrat
Administrator
Posts: 7275 Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 127 times
Been thanked: 634 times
#5
Post
by sunrat » 2022-04-04 07:06
shirish wrote: ↑ 2022-04-04 05:00 Pehraps one of the options has an issue.
Probably. Did you try with less options? Or read the man page to find the correct syntax for the options? Seeing as you copied all the images to a new directory, open a terminal in that directory and do:
I'm sure that works as I use similar commands regularly.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!