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?".
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-26T15:15:41-07:00
My script above is what you want. Be sure to include the full path to the text file.
The code assumes that all files are on separate lines of the text file. And that you have created a new directory to hold the output files.
Code: Select all
list=`cat path2/filelog.txt`
for img in $list; do
convert $img -quality 50 absolutepath2/newdirectory/$img
done
Hold off. I see a mistake.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-26T15:19:08-07:00
what would be the filename? and how would I run it on Cent OS?
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-26T15:20:28-07:00
correction:
Code: Select all
list=`cat path2/filelog.txt`
for img in $list; do
name=`convert "$img" -format "%t" info:`
suffix=`convert "$img" -format "%e" info:`
convert "$img" -quality 50 absolutepath2/newdirectory/$name.$suffix
done
Just copy and paste into a terminal window, assuming your text file is named filelog.txt
Be sure to create the new directory to hold the output images.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-26T17:06:21-07:00
Please explain -format "%t" and -format "%e"
Why weed that?
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T08:36:47-07:00
suffix=`convert "$img" -format "%e" info:`
convert "$img" -quality 50 absolutepath2/newdirectory/$name.$suffix
there will be no double quotes ("") after -quality 50?
and suffix also contains convert keyword and again it gets repeat for absolutepath2.
I am confused.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T08:42:41-07:00
Code: Select all
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Dresses - Ali/wholesale2015newolivestrapVnecksexybodyconcelebritypartypencilwomenbandageDress-32522073354-1.jpeg
Error:
Code: Select all
convert: unable to open image `/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens': No such file or directory @ error/blob.c/OpenBlob/2589.
convert: no decode delegate for this image format `/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens' @ error/constitute.c/ReadImage/532.
convert: missing an image filename `/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens' @ error/convert.c/ConvertImageCommand/3015.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T08:49:57-07:00
I am not using any absolute path. I want it to be replace with original one. I have already created backup of those images. So help me with the same path code. No absolute path. Please.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-27T09:36:52-07:00
If you remove your leading and trailing quotes in your filelog.txt and run the following code from where you have the filelog.txt, then it should work. If you have the filelog.txt somewhere else, then you need to provide the path to it. This code assumes that each image is on a different line in your filelog.txt.
Code: Select all
cat filelog.txt | \
while read img; do
convert "$img" -quality 50 "$img"
done
But be aware that if this goes wrong, you are overwriting your good files with bad ones. So be sure you have backups.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T11:18:30-07:00
Filename:
Lot-10-packs--3-jumping-pills-tricky-toys-for-jokes---Gags-lovely-jumping-pills-move-with-ur-hand-gest-XD-1348619149-0.jpeg
Original file before running script:
Code: Select all
-rw-r--r-- 1 vramadmin psacln 1.1M Sep 6 09:07 Lot-10-packs--3-jumping-pills-tricky-toys-for-jokes---Gags-lovely-jumping-pills-move-with-ur-hand-gest-XD-1348619149-0.jpeg
And it remains the same after running the above code.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T11:20:41-07:00
filelog.txt
Code: Select all
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Blouses - Ali/2016-fashion-women-top-kimono-blouses-O-neck-shirts-chiffon-casual-vintage-tops-plus-size-XXXXL-5XL-blusas-blouse-women--39-s-32662724086-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Blouses - Ali/2016-fashion-women-top-kimono-blouses-O-neck-shirts-chiffon-casual-vintage-tops-plus-size-XXXXL-5XL-blusas-blouse-women--39-s-32662724086-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Blouses - Ali/2016-Summer-style-Kimono-blouses-top-Plus-size-XS-5XL-Chiffon-Printed-Short-sleeve-Casual-Women-shirts-blusas-tops-vintage-body-32376650646-751.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S CASUAL SHOES/Spring-Summer-New-Breathable-Mesh-Lace-Openwork-Lovers-Shoes-Leisure-Lovers-Sports-Shoe-220613480337117184-1.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S CASUAL SHOES/2016-Outdoor-Casual-Shoes-cheap-men-s-air-Training-Casual-Shoes-Blue-Yellow-Mullti-Men-Sizes-40-47-221763096755720192-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S CASUAL SHOES/Spring-Summer-New-Breathable-Mesh-Lace-Openwork-Lovers-Shoes-Leisure-Lovers-Sports-Shoe-220613480337117184-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S CASUAL SHOES/2016-Outdoor-Casual-Shoes-cheap-men-s-air-Training-Casual-Shoes-Blue-Yellow-Mullti-Men-Sizes-40-47-221763096755720192-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S CASUAL SHOES/2015-Simulation-Led-Shoes-For-Adults-Fashion-High-Quality-Unisex-LED-Luminous-Shoes-Men---women-Casual-Shoes-led-shoe-female-209433903258415104-2.gif
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens_sunglasses/2016FashionSunglassesWomenLuxuryCatEyeSunglassesFamousLadyBrandDesignerTwin-BeamsSunglassesCoatingMirrorGlasses-32664647697-1.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/PROJECTORS & ACCESSORIES/High-Quality-GP8S-LED-Projector-LCD-Mini-Projector-portable-multimedia-cinema-HDMI-VGA-USB-TV-Video-Movie-proyector-home-theater-220658726242328576-9619.gif
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/PROJECTORS & ACCESSORIES/DHL-free--Aiptek-Mobile-Cinema-D28-DVD-Projector-640-480-Mobile-Cinema-mini-led-pocket-projector-widely-use-for-Business--Education-Home-211636220183748608-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-bottoms-shorts-DH/Eugen-Summer-Yarn-Skirt-Waist-Gauze-Skirt-Lace-Chiffon-Skirt-Female-Korean-Bow-Skirt-221851559779659776-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-bottoms-shorts-DH/ThehotblastholeinwomensDressShortsshortsdenimrivets-180039901488988160-6733.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Tops - Camis - Ali/Hot--2016-The-Newest-Summer-Style-For-Women-3D-Printed-Black-Back-Batman-Cat-Seleton-Sexy-Bandage-Halter-Tops-Cropped-Feminino-32658068703-3741.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Tops - Camis - Ali/Hot--2016-The-Newest-Summer-Style-For-Women-3D-Printed-Black-Back-Batman-Cat-Seleton-Sexy-Bandage-Halter-Tops-Cropped-Feminino-32658068703-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Tops - Camis - Ali/Hot--2016-The-Newest-Summer-Style-For-Women-3D-Printed-Black-Back-Batman-Cat-Seleton-Sexy-Bandage-Halter-Tops-Cropped-Feminino-32658068703-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Baby Boys Clothing Shorts/2016BabyBoyJeansPantsSolidRegularFitPutonJeansButtonNew6-24MonthChildrenClothingKidsTrousers-224795688172945408-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/NAILS & TOOLS/Wholesale35gramBulkPacksExtraUltraFineGlitterDustPowderNailsArtTipsBodyCraftsDecorationColorChoice-210178463279775744-8639.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/NAILS & TOOLS/New-Soft-Silicone-Finger-Wearable-Nail-Gel-Polish-Bottle-Holder-with-Ring-Creative-Nail-Art-Tools-Polish-Varnish-Bottle-Display-Stand-Holder-224566160032477184-1632.gif
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/PRINTER SUPPLIES/2016-Micromake-3D-Printer-Pulley-Version-Linear-Guide-DIY-Kit-Kossel-Delta-Auto-Leveling-Large-Printing-Size-3D-Metal-Printer-226490565598810114-3882.gif
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/PUZZLES & MAGIC CUBES/WholesaleMarvelSuperHeroesMinifigures55pcslotClassicToysleBuildingBlocksgoSetsModelBricksFiguresAvengersMinifiguretoy-227185966496698368-241.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/MOBILE PHONE CABLES/2016FlowingUSBCableUpgradeExtraBrightBrilliantLEDLightUpChargingDataCablewDirectionFlowStreamwOppBag-226027016725585920-8733.gif
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens-bottoms-capris-DH/EugenSummerYarnSkirtWaistGauzeSkirtLaceChiffonSkirtFemaleKoreanBowSkirt-221851559779659776-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Suits - Skirt/NewArrivalsummerFashionwomen39sskirtsuitEuropeanHighStreetDesignerClothingSetBlackBlouse2piecePrintedSkirtSet-32220729023-3988.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/PANTS/2016BabyBoyJeansPantsSolidRegularFitPutonJeansButtonNew6-24MonthChildrenClothingKidsTrousers-224795688172945408-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Jackets - Vests/Long-Cotton-Padded-Vest-Jacket-with-Hoodies-2016-New-Fashion-Women-Autumn-Winter-Warm-Coat-Ladies-Hooded-Slim-Coat-Outerwear-Top-32700200339-8911.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/SweatshirtsFashionMenPatchwork2016SpringTwentyOnePilotsHalfPatternPulloverPrintBlackPlusSizeSportsCasualHoodie-32591599913-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/family-matching-outfits/FamilyLookNavyStripedSummerCottonShort-sleeveT-shirtsTeesMatchingClothingOutfitsForMotherDaughterAndFatherSon-32484948616-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-cases/MovingStarsColorfulLiquidGlitterQuicksand3DBlingPhoneCaseCoverForAppleIphone66sPlusiphone55S44SShiningStarLiquidCase-191660999321419776-588.gif
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womes - Jackets - Fux - Dh/MensfauxLeatheroutwearLookMotorcycleRiderBomberThickJacket-162255672857264128-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-bottoms-skirts-DH/Eugen-Summer-Yarn-Skirt-Waist-Gauze-Skirt-Lace-Chiffon-Skirt-Female-Korean-Bow-Skirt-221851559779659776-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S BOOTS/Autumn-and-Winter-of-2016-New-England-Ms--Martin-Boots-Slope-with-Lady-Lace-Up-Boots-227560392240676864-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S BOOTS/Autumn-and-Winter-of-2016-New-England-Ms--Martin-Boots-Slope-with-Lady-Lace-Up-Boots-227560392240676864-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S BOOTS/2016-new-winter-boots-increased-tassel-boots-round-boots-with-frosted-low-Knee-Boots-high-boots-226852660580384768-1.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/WOMEN'S BOOTS/In-The-Fall-and-Winter-of-2016-New-Knee-high-Boots-Sexy-High-heeled-Pointed-Ms-Knee-high-Boots-231190799794233344-1487.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Home Office Furniture/FurnitureofAmericaCassidyTieredDistressedGrey10-ShelfOpenBookcase-18078468-3440.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Home Office Furniture/FurnitureofAmericaCassidyTieredDistressedGrey10-ShelfOpenBookcase-18078468-1720.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Home Office Furniture/FurnitureofAmericaCassidyTieredDistressedGrey10-ShelfOpenBookcase-18078468-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Home Office Furniture/FurnitureofAmericaRobbieModernHeightAdjustableBlackEspressoDraftingDesk-18357513-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/SweatshirtsFashionMenPatchwork2016SpringTwentyOnePilotsHalfPatternPulloverPrintBlackPlusSizeSportsCasualHoodie-32591599913-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/BRIDESMAID DRESSES/SparklyRoseGoldCheap2015MermaidBridesmaidDresses2016ShortSleeveSequinsBacklessLongBeachWeddingPartyGownsGoldChampagne-203576083473432576-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Tops - Camis - DH/EugenSummerYarnSkirtWaistGauzeSkirtLaceChiffonSkirtFemaleKoreanBowSkirt-221851559779659776-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Baseus-Universal-Car-Phone-Holder-360-Degree-GPS-Magnetic-Mobile-Phone-Holder-For-iPhone-Samsung-Magnet-Mount-Holder-Stand-32694707035-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/BaseusUniversalCarPhoneHolder360DegreeGPSMagneticMobilePhoneHolderForiPhoneSamsungMagnetMountHolderStand-32694707035-2568.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Umi-Super-Universal-Magnetic-Car-Mobile-Phone-Holder-360-Degree-Air-Vent-Mount-Stand-For-iphone-6s-6-plus-Samsung-Galaxy-S7-edge-32680096283-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Baseus-Universal-Car-Phone-Holder-360-Degree-GPS-Magnetic-Mobile-Phone-Holder-For-iPhone-Samsung-Magnet-Mount-Holder-Stand-32694707035-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Baseus-Universal-Car-Phone-Holder-360-Degree-GPS-Magnetic-Mobile-Phone-Holder-For-iPhone-Samsung-Magnet-Mount-Holder-Stand-32694707035-875.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Baseus-Universal-Car-Phone-Holder-360-Degree-GPS-Magnetic-Mobile-Phone-Holder-For-iPhone-Samsung-Magnet-Mount-Holder-Stand-32694707035-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Baseus-Universal-Car-Phone-Holder-360-Degree-GPS-Magnetic-Mobile-Phone-Holder-For-iPhone-Samsung-Magnet-Mount-Holder-Stand-32694707035-7415.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Umi-Super-Universal-Magnetic-Car-Mobile-Phone-Holder-360-Degree-Air-Vent-Mount-Stand-For-iphone-6s-6-plus-Samsung-Galaxy-S7-edge-32680096283-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/BaseusUniversalCarPhoneHolder360DegreeGPSMagneticMobilePhoneHolderForiPhoneSamsungMagnetMountHolderStand-32694707035-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Umi-Super-Universal-Magnetic-Car-Mobile-Phone-Holder-360-Degree-Air-Vent-Mount-Stand-For-iphone-6s-6-plus-Samsung-Galaxy-S7-edge-32680096283-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Baseus-Universal-Car-Phone-Holder-360-Degree-GPS-Magnetic-Mobile-Phone-Holder-For-iPhone-Samsung-Magnet-Mount-Holder-Stand-32694707035-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/BaseusUniversalCarPhoneHolder360DegreeGPSMagneticMobilePhoneHolderForiPhoneSamsungMagnetMountHolderStand-32694707035-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/BaseusUniversalCarPhoneHolder360DegreeGPSMagneticMobilePhoneHolderForiPhoneSamsungMagnetMountHolderStand-32694707035-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/Umi-Super-Universal-Magnetic-Car-Mobile-Phone-Holder-360-Degree-Air-Vent-Mount-Stand-For-iphone-6s-6-plus-Samsung-Galaxy-S7-edge-32680096283-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/phones-accessories-holders/BaseusUniversalCarPhoneHolder360DegreeGPSMagneticMobilePhoneHolderForiPhoneSamsungMagnetMountHolderStand-32694707035-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/sleep-lounge/Maternity-Clothing-Nursing-Tops-Long-Pants-Sets-Sleepwear-2016-Spring-Autumn-Pregnant-Women-Breastfeeding-Pajamas-Gravida-Shirts-739961297-8975.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-watches/Unisex-Geneva-Leather-PU-Quartz-Watches-Men-Women-Luxury-Brand-Numerals-Men-s-Watch-Casual-dress-wrist-watches-170230772028567552-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-watches/Unisex-Geneva-Leather-PU-Quartz-Watches-Men-Women-Luxury-Brand-Numerals-Men-s-Watch-Casual-dress-wrist-watches-170230772028567552-8483.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/exterior-accessories/Japanese-sun-flag-art-form-rising-sun-flag-Vinyl-Decal-Made-in-Japan-Lettering-Art-Car-Sticker-JDM-for-SUV-Truck-Window-Showcase-216730556154068992-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/exterior-accessories/Japanese-sun-flag-art-form-rising-sun-flag-Vinyl-Decal-Made-in-Japan-Lettering-Art-Car-Sticker-JDM-for-SUV-Truck-Window-Showcase-216730556154068992-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/sunglasses/2020OpticalBrand2016NewPolarizedSunglassesFashionMaleEyewearOutdoorSunGlassesOculosGafasDeSolPL66-32651097857-1457.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/sunglasses/2020OpticalBrand2016NewPolarizedSunglassesFashionMaleEyewearOutdoorSunGlassesOculosGafasDeSolPL66-32651097857-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/SweatshirtsFashionMenPatchwork2016SpringTwentyOnePilotsHalfPatternPulloverPrintBlackPlusSizeSportsCasualHoodie-32591599913-7832.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Makeup/hotsellingHighqualitybrandMakeupMatteLipstick3GLong-lastingLipstick18color12pcslot-198660748386377728-1117.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womes_clothing_accessories/2016NewFashionKoreanBrandHairClipRoseHairClawsClipsHairAccessoriesForWomenGirlsHairCrabClampHotFreeShipping-32649853511-1.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Living-Room-Furniture/FurnitureofAmericaModernTreasureConsoleSofaTable-15437364-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Living-Room-Furniture/FurnitureofAmericaModernTreasureConsoleSofaTable-15437364-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Tops - tshirts - DH/EugenSummerYarnSkirtWaistGauzeSkirtLaceChiffonSkirtFemaleKoreanBowSkirt-221851559779659776-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Bathroom-Furniture/36-inchIndustrialOpenShelfVanity-18184005-7883.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Bathroom-Furniture/36-inchIndustrialOpenShelfVanity-18184005-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/classic-toys/5pcs-lot-Bubble-Stickers-3D-Cartoon-the-Spider-man-Classic-Toys-Scrapbook-For-Kids-Children-Gift-Reward-Sticker-GYH-32623760491-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/classic-toys/MinitudouClassicCookingToysForChildren46PCSPretendPlayCuttingFoodSetKidsKitchenToys-32672017916-816.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/classic-toys/MinitudouClassicCookingToysForChildren46PCSPretendPlayCuttingFoodSetKidsKitchenToys-32672017916-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Tops - Polos - DH/women-chiffon-blouse-tops-and-blouses-fashion-Kimono-Chiffon-Coat-Tassel-Fringe-Shawl-Fashion-women-blouses-173840159442087936-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Accessories -Scarves/Hotsale100puresilkwomensquarescarveslady39snewfashiongridprintscarf9090cmbluebrownredcream-32366810339-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Accessories -Scarves/Hotsale100puresilkwomensquarescarveslady39snewfashiongridprintscarf9090cmbluebrownredcream-32366810339-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/SweatshirtsFashionMenPatchwork2016SpringTwentyOnePilotsHalfPatternPulloverPrintBlackPlusSizeSportsCasualHoodie-32591599913-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/mens boots/SURGUT-Brand-Super-Warm-Men--39-s-Winter-Leather-Men-Waterproof-Rubber-Snow-Boots-Leisure-Martin-Boots-England-Retro-Shoes-For-Mens-32698327597-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/baby-safety-gear/Kid-keeper-Baby-Safety-Harness-Toddler-Reins-Backpack-Straps-harnesses-for-child-girl-ladybird-1pc-1086353765-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/baby-safety-gear/2016NewBabyCarrierslingsMultifunctionhigh-qualityCottonBreathableBackpackswithWaiststoolfor3-36M0-23Kg-214121018003361792-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Bedroom-Furniture/CrownComfort6-inchQueen-sizeMemoryFoamMattress-18539541-2.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Bottoms - Jenas - DH/AutumnNewEurope2015FinePackageHipBigBluePencilJeansYardsDress-213456246884130816-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Bottoms - Jenas - DH/Eugen-Summer-Yarn-Skirt-Waist-Gauze-Skirt-Lace-Chiffon-Skirt-Female-Korean-Bow-Skirt-221851559779659776-3.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Bottoms - Jenas - DH/Autumn-New-Europe-2015-Fine-Package-Hip-Big-Blue-Pencil-Jeans-Yards-Dress-215621615368265728-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Bottoms - Jenas - DH/Autumn-New-Europe-2015-Fine-Package-Hip-Big-Blue-Pencil-Jeans-Yards-Dress-213087853351981056-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Bottoms - Jenas - DH/Autumn-New-Europe-2015-Fine-Package-Hip-Big-Blue-Pencil-Jeans-Yards-Dress-213104210678816768-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Bottoms - Jenas - DH/Autumn-New-Europe-2015-Fine-Package-Hip-Big-Blue-Pencil-Jeans-Yards-Dress-213103550535659520-2.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/other-vehicle-parts-accessories/New-Car-Universal--Boost-Controller-Regulator-Pressure-Control-Valve-Kit-Red-Black-Blue-32585093318-284.jpg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/other-vehicle-parts-accessories/Multi-Kits-mount-for-camera-case-Waterproof-Shot-Accessories-sports-Mounting-Kits-for-phone-mount-kit-32279473730-1.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Sweaters/DownEastBasicsWomensLightweightSummerAirCardigan-17444617-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Sweaters/DownEastBasicsWomensLightweightSummerAirCardigan-17444617-5.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Womens - Sweaters/DownEastBasicsWomensSummerAirCardigan-18579338-4.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Patio-Furniture/ChristopherKnightHomePuerta4-pieceBrownOutdoorWickerSofaSet-16827733-2596.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/Patio-Furniture/ChristopherKnightHomeToscanaOutdoorWickerAdjustableChaiseLoungewithCushionSetof2-16300694-0.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/bathroom accessories sets/Multifuction-Sucker-Toothbrush-Holder-Suction-Wall-Automatic-Toothpaste-Dispenser-Soap-Holder-Phone-Holder-With-3-Cups-32685747936-3.jpeg
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/school-supplies/Sequins-Table-Cloth-Custom-Made-High-Quality-Wedding-Decorations-Table-Skirting-Party-Birthday-Supplies-2016-Sequined-Table-Cloth-161627237088460800-2.jpeg
/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
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/womens-intimates-camisoles/2016NewSpecialOfferFreeShippingSummerWomenJapaneseStyleAll-matchSmallVestShoulderStrapTankWhiteTopFemale-1548528299-0.png
/var/www/vhosts/addiszone.com/httpdocs/image/catalog/NOVELTY & GAG TOYS/Lot-10-packs--3-jumping-pills-tricky-toys-for-jokes---Gags-lovely-jumping-pills-move-with-ur-hand-gest-XD-1348619149-0.jpeg
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-27T11:36:15-07:00
I am not sure what you are telling me. I do not understand. What remains the same? You said you wanted the output to be written over with the same name in the same directory. The script should have done that. All that would have changed is the Quality value, which would have been set to 50. To see the change in Quality, you need to run
with the quotes since you have spaces in the name or directories. Then look down towards the bottom but just above Properties and see where it says
Quality: XX
where XX should now be
50 .
Please clarify further what you think is going wrong.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T11:39:46-07:00
Compression: JPEG
Quality: 75
Orientation: Undefined
I can see this as output for the above file. Quality is not set to 50.
vipvicks71
Posts: 22 Joined: 2016-09-26T10:27:07-07:00
Authentication code: 1151
Post
by vipvicks71 » 2016-09-27T11:49:28-07:00
Code run:
Code: Select all
cat filelog.txt | \
while read img; do
convert "$img" -quality 50 -resize '1000>x2000>' "$img"
done
Result:
Code: Select all
Geometry: 4000x3000+0+0
Compression: JPEG
Quality: 75
What I am doing wrong again?
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2016-09-27T12:15:02-07:00
You changed the command and added -resize. You need to put -quality after -resize as follows. See if that works.
Code: Select all
convert "$img" -resize '1000x2000>' -quality 50 "$img"
Note you only need > at the end.