Resize Images from a file

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?".
vipvicks71
Posts: 22
Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151

Re: Resize Images from a file

Post by vipvicks71 »

No change in any file. :(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

Sorry, then your old version of Imagemagick may have a bug. It works fine for me on current Imagemagick 6. I do not know what to tell you. The only thought is that it is not processing the images.

try this

Code: Select all

cat filelog.txt | \
while read img; do
echo "$img"
done
Does that list your files to the terminal? If not, then you may need to provide a full path to your filelog.txt.

Do you get any error message?

If the above works, then try

Code: Select all

cat filelog.txt | \
while read img; do
identify "$img"
done
What do you get from that?


Perhaps you should create a new folder with one or two test images and a new filelog.txt and test that before trying to process your actual full set of images.

Are you copying and pasting this code into a terminal window? If not, how are you running it?
vipvicks71
Posts: 22
Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151

Re: Resize Images from a file

Post by vipvicks71 »

how to update correctly on OS: CentOS 6.8 (Final)
Any idea?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

I do not know what you mean? You can install IM from source, but that is hard on Linux. Otherwise, you need to find a distribution with a more current IM. But see my comments above.
vipvicks71
Posts: 22
Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151

Re: Resize Images from a file

Post by vipvicks71 »

No error. Following output:

Code: Select all

/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Blouses - DH/Eugen-Summer-Yarn-Skirt-Waist-Gauze-Skirt-Lace-Chiffon-Skirt-Female-Korean-Bow-Skirt-221851559779659776-3.png PNG 751x803 751x803+0+0 8-bit DirectClass 1.375MB 0.000u 0:00.000
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-intimates-camisoles/2016NewSpecialOfferFreeShippingSummerWomenJapaneseStyleAll-matchSmallVestShoulderStrapTankWhiteTopFemale-1548528299-0.png PNG 717x692 717x692+0+0 8-bit DirectClass 1.265MB 0.000u 0:00.000
Are you copying and pasting this code into a terminal window? If not, how are you running it?

Code: Select all

Yes, I am copying and pasting the code directly into a terminal window
Till 50 lines it works, but after that, simply ignore's the lines from filelog.txt
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

Post a copy of your full text file (zip compressed) so we can inspect it. You probably have some bad characters. At exactly what filename (and line in the text file) did it fail.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Resize Images from a file

Post by GeeMack »

vipvicks71 wrote:how to update correctly on OS: CentOS 6.8 (Final)
I have no idea about compatibility of versions, but there is a link to a binary download of IM 7.0.3 AT THIS LINK that says it's for "Redhat / CentOS 7.1 x86_64 RPM". You might even have to find a forum for CentOS users to get the right kind of advice or help. There may not even be a way to make it work. I don't know.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

Do you realize that quality is primarily pertinent to JPG files. The -quality value is quite different for use with PNG. A value of 100 or 50 may not be relevant to both JPG and PNG. See http://www.imagemagick.org/script/comma ... hp#quality
vipvicks71
Posts: 22
Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151

Re: Resize Images from a file

Post by vipvicks71 »

@fmw42 give me your email address. I will send you the zip file of filelog.txt
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

you can email me directly (fmw at alink dot net)
vipvicks71
Posts: 22
Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151

Re: Resize Images from a file

Post by vipvicks71 »

I have sent you an email. Please verify that you have received.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

Till 50 lines it works, but after that, simply ignore's the lines from filelog.txt
Which script was this that failed after 50 lines? Was it the one that resized the images or the one that just listed the file information?

I do not see anything odd about your file. But perhaps the names do not correspond to some of the images?

You did not answer my question about which was the last file (name) processed correctly.

Please run the following and send me the results. I need to see if you have a file that is too large. How much RAM do you have?

Code: Select all

i=1
cat filelog.txt | \
while read img; do
echo "$i"
identify "$img"
i=$((i+1))
echo ""
done
Does this process every image? If not, then where does it stop?

From the previous script that processes the images, find the image that was last to process correctly and the next one and send me both original files. If you cannot do that, then for each send me the results of

Code: Select all

identify -version yourimage
So I can see its properties.
vipvicks71
Posts: 22
Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151

Re: Resize Images from a file

Post by vipvicks71 »

I will run the script and will send you the results. I have 8GB RAM. It does not work on png and gif. It works on all jpeg file.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resize Images from a file

Post by fmw42 »

vipvicks71 wrote:It does not work on png and gif. It works on all jpeg file.
Which script does not work on png or gif?

What do you get from

Code: Select all

convert -version
Can you

Code: Select all

convert image.png -resize XX% newimage.png
convet image.gif -resize XX% newimage.gif
Do they work?

NOTE that PNG uses a different numbering for -quality and GIF has no quality. The only change you can make with gif is number of colors.
Post Reply