{"id":28,"date":"2016-01-24T13:35:58","date_gmt":"2016-01-24T13:35:58","guid":{"rendered":"http:\/\/liberty.fdn.fr\/?p=28"},"modified":"2025-08-17T20:12:46","modified_gmt":"2025-08-17T20:12:46","slug":"convertir-toutes-les-images-png-dun-dossier-en-niveaux-de-gris","status":"publish","type":"post","link":"http:\/\/renaudguezennec.eu\/index.php\/2016\/01\/24\/convertir-toutes-les-images-png-dun-dossier-en-niveaux-de-gris\/","title":{"rendered":"Convertir toutes les images (png) d&#8217;un dossier en niveaux de gris."},"content":{"rendered":"<p>Bonjour,<\/p>\n<p>Une petite commande pour cr\u00e9er des copies en niveaux de gris des images png du dossier courant.<\/p>\n<pre class=\"code\">for i in *.png; do name=`echo $i | awk -F '.' '{print $1}'`; convert $i -colorspace Gray $name-gray.png; done<\/pre>\n<p>Les copies portent le m\u00eame nom que l&#8217;original avec le suffixe -gray.<br \/>\nCela peut facilement \u00eatre adapt\u00e9 pour des jpg ou autres formats d&#8217;images.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bonjour, Une petite commande pour cr\u00e9er des copies en niveaux de gris des images png du dossier courant. for i in *.png; do name=`echo $i | awk -F &#8216;.&#8217; &#8216;{print $1}&#8217;`; convert $i -colorspace Gray $name-gray.png; done Les copies portent le m\u00eame nom que l&#8217;original avec le suffixe -gray. Cela peut facilement \u00eatre adapt\u00e9 pour [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[31,80],"tags":[25,26,22],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-tips","category-fr","tag-bash","tag-ci","tag-linux"],"_links":{"self":[{"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":1,"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":29,"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/posts\/28\/revisions\/29"}],"wp:attachment":[{"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/renaudguezennec.eu\/index.php\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}