{"id":21366,"date":"2024-02-01T02:19:36","date_gmt":"2024-02-01T01:19:36","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=21366"},"modified":"2024-01-31T20:44:26","modified_gmt":"2024-01-31T19:44:26","slug":"speicher-sparen-mit-dem-webp-format-mit-cwebp-auf-dem-raspberry-pi","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=21366","title":{"rendered":"Speicher sparen mit dem WebP Format mit cwebp auf dem Raspberry Pi"},"content":{"rendered":"<p><a href=\"https:\/\/de.wikipedia.org\/wiki\/WebP\" rel=\"noopener\" target=\"_blank\">WebP<\/a> (sprich engl. &#8222;weppy&#8220;) ist ein modernes Bildformat, das von Google entwickelt wurde, um hochwertige Bilder mit geringerer Dateigr\u00f6\u00dfe im Vergleich zu anderen Bildformaten wie JPEG und PNG zu liefern. Das WebP-Tool unter Linux bietet eine leistungsstarke L\u00f6sung f\u00fcr die Konvertierung und Optimierung von Bildern.<\/p>\n<p>Mit dem Tool cwebp k\u00f6nnen PNG, JPEG, TIFF Bilder in das WebP Format und zur\u00fcck umgeformt werden.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1.png\" alt=\"\" width=\"1920\" height=\"1080\" class=\"aligncenter size-full wp-image-21367\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1.png 1920w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-300x169.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-1024x576.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-768x432.png 768w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-1536x864.png 1536w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>Diese Datei hat z.B. eine Gr\u00f6\u00dfe von 1,4 MByte und nach der Umformung nur noch 18 KByte. Da lohnt sich doch der Aufruf, <\/p>\n<p><strong>cwebp 1.png -o 1.webp<\/strong><\/p>\n<p>Ausgabe: <!--more--><\/p>\n<pre class=\"theme:mm-dark-blue font:monospace minimize:true lang:default decode:true \" >\r\n\r\nraspberry@pi:~ $ cwebp 1.png -o 1.webp\r\nSaving file '1.webp'\r\nFile:      1.png\r\nDimension: 1920 x 1080\r\nOutput:    18006 bytes Y-U-V-All-PSNR 49.70 48.64 48.43   49.28 dB\r\nblock count:  intra4: 1140\r\n              intra16: 7020  (-&gt; 86.03%)\r\n              skipped block: 6251 (76.61%)\r\nbytes used:  header:            178  (1.0%)\r\n             mode-partition:   5857  (32.5%)\r\n Residuals bytes  |segment 1|segment 2|segment 3|segment 4|  total\r\n    macroblocks:  |       1%|       2%|       4%|      91%|    8160\r\n      quantizer:  |      36 |      36 |      34 |      25 |\r\n   filter level:  |      11 |      62 |      58 |      22 |<\/pre>\n<p>da man auch keinen Unterschied sieht, oder:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1.webp\" alt=\"\" width=\"1920\" height=\"1080\" class=\"aligncenter size-full wp-image-21368\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1.webp 1920w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-300x169.webp 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-1024x576.webp 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-768x432.webp 768w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2024\/01\/1-1536x864.webp 1536w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>Wenn das Programm noch nicht installiert ist, geht es schnell mit:<\/p>\n<p><strong>sudo apt install webp<\/strong><\/p>\n<p>Hier noch die Anleitung:<\/p>\n<pre class=\"theme:mm-dark-blue font:monospace minimize:true lang:default decode:true \" >\r\n\r\ncwebp -longhelp\r\nUsage:\r\n cwebp [-preset &lt;...&gt;] [options] in_file [-o out_file]\r\n\r\nIf input size (-s) for an image is not specified, it is\r\nassumed to be a PNG, JPEG, TIFF or WebP file.\r\n\r\nOptions:\r\n  -h \/ -help ............. short help\r\n  -H \/ -longhelp ......... long help\r\n  -q &lt;float&gt; ............. quality factor (0:small..100:big), default=75\r\n  -alpha_q &lt;int&gt; ......... transparency-compression quality (0..100),\r\n                           default=100\r\n  -preset &lt;string&gt; ....... preset setting, one of:\r\n                            default, photo, picture,\r\n                            drawing, icon, text\r\n     -preset must come first, as it overwrites other parameters\r\n  -z &lt;int&gt; ............... activates lossless preset with given\r\n                           level in [0:fast, ..., 9:slowest]\r\n\r\n  -m &lt;int&gt; ............... compression method (0=fast, 6=slowest), default=4\r\n  -segments &lt;int&gt; ........ number of segments to use (1..4), default=4\r\n  -size &lt;int&gt; ............ target size (in bytes)\r\n  -psnr &lt;float&gt; .......... target PSNR (in dB. typically: 42)\r\n\r\n  -s &lt;int&gt; &lt;int&gt; ......... input size (width x height) for YUV\r\n  -sns &lt;int&gt; ............. spatial noise shaping (0:off, 100:max), default=50\r\n  -f &lt;int&gt; ............... filter strength (0=off..100), default=60\r\n  -sharpness &lt;int&gt; ....... filter sharpness (0:most .. 7:least sharp), default=0\r\n  -strong ................ use strong filter instead of simple (default)\r\n  -nostrong .............. use simple filter instead of strong\r\n  -sharp_yuv ............. use sharper (and slower) RGB-&gt;YUV conversion\r\n  -partition_limit &lt;int&gt; . limit quality to fit the 512k limit on\r\n                           the first partition (0=no degradation ... 100=full)\r\n  -pass &lt;int&gt; ............ analysis pass number (1..10)\r\n  -crop &lt;x&gt; &lt;y&gt; &lt;w&gt; &lt;h&gt; .. crop picture with the given rectangle\r\n  -resize &lt;w&gt; &lt;h&gt; ........ resize picture (after any cropping)\r\n  -mt .................... use multi-threading if available\r\n  -low_memory ............ reduce memory usage (slower encoding)\r\n  -map &lt;int&gt; ............. print map of extra info\r\n  -print_psnr ............ prints averaged PSNR distortion\r\n  -print_ssim ............ prints averaged SSIM distortion\r\n  -print_lsim ............ prints local-similarity distortion\r\n  -d &lt;file.pgm&gt; .......... dump the compressed output (PGM file)\r\n  -alpha_method &lt;int&gt; .... transparency-compression method (0..1), default=1\r\n  -alpha_filter &lt;string&gt; . predictive filtering for alpha plane,\r\n                           one of: none, fast (default) or best\r\n  -exact ................. preserve RGB values in transparent area, default=off\r\n  -blend_alpha &lt;hex&gt; ..... blend colors against background color\r\n                           expressed as RGB values written in\r\n                           hexadecimal, e.g. 0xc0e0d0 for red=0xc0\r\n                           green=0xe0 and blue=0xd0\r\n  -noalpha ............... discard any transparency information\r\n  -lossless .............. encode image losslessly, default=off\r\n  -near_lossless &lt;int&gt; ... use near-lossless image\r\n                           preprocessing (0..100=off), default=100\r\n  -hint &lt;string&gt; ......... specify image characteristics hint,\r\n                           one of: photo, picture or graph\r\n\r\n  -metadata &lt;string&gt; ..... comma separated list of metadata to\r\n                           copy from the input to the output if present.\r\n                           Valid values: all, none (default), exif, icc, xmp\r\n\r\n  -short ................. condense printed message\r\n  -quiet ................. don't print anything\r\n  -version ............... print version number and exit\r\n  -noasm ................. disable all assembly optimizations\r\n  -v ..................... verbose, e.g. print encoding\/decoding times\r\n  -progress .............. report encoding progress\r\n\r\nExperimental Options:\r\n  -jpeg_like ............. roughly match expected JPEG size\r\n  -af .................... auto-adjust filter strength\r\n  -pre &lt;int&gt; ............. pre-processing filter<\/pre>\n<p>WebP kann leicht in Automatisierungs- und Workflow-Umgebungen integriert werden. Es kann in Skripte eingebunden oder als Teil von Build-Prozessen verwendet werden, um Bilder automatisch zu optimieren und konvertieren.<\/p>\n<p>Das WebP-Tool unter Linux bietet eine effiziente M\u00f6glichkeit, Bilder mit hoher Qualit\u00e4t und geringer Dateigr\u00f6\u00dfe zu erstellen. Durch die Integration in verschiedene Workflows und die Verf\u00fcgbarkeit auf verschiedenen Linux-Plattformen wird es zu einem wertvollen Werkzeug f\u00fcr Entwickler und Bildbearbeiter gleicherma\u00dfen. <\/p>\n<p>Experimentieren Sie mit den verschiedenen Optionen und passen Sie sie an Ihre spezifischen Anforderungen an, um das Beste aus diesem leistungsstarken Tool herauszuholen.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WebP (sprich engl. &#8222;weppy&#8220;) ist ein modernes Bildformat, das von Google entwickelt wurde, um hochwertige Bilder mit geringerer Dateigr\u00f6\u00dfe im Vergleich zu anderen Bildformaten wie JPEG und PNG zu liefern. Das WebP-Tool unter Linux bietet eine leistungsstarke L\u00f6sung f\u00fcr die Konvertierung und Optimierung von Bildern. Mit dem Tool cwebp k\u00f6nnen PNG, JPEG, TIFF Bilder in &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=21366\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eSpeicher sparen mit dem WebP Format mit cwebp auf dem Raspberry Pi\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[220,2173,808,7],"tags":[552,5907,5242,5908,260,1358,692,5909,1633,5241,5910],"class_list":["post-21366","post","type-post","status-publish","format-standard","hentry","category-anleitung","category-debian","category-linux-2","category-tools","tag-bilder","tag-cwebp","tag-jpeg","tag-komorimieren","tag-png","tag-sparen","tag-speicher","tag-tiff","tag-umwandeln","tag-webp","tag-weppy"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/21366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21366"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/21366\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21366"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}