Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-7491

Add an optipng rule to the sanity bot

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • master
    • Sanity Bot
    • None

      I try to check this manually whenever I see pngs, but I'm sure there are some that are missed (find . -name "*.png" -exec optipng -o 7 -strip all {} \; can verify that). It would be helpful to have the sanity bot check this.

      An example run:

      mitch@mitch-ubuntu:~/dev/qt-dev2/qtdoc$ optipng -o 7 -strip all examples/demos/qtoycustomizer/images/AngelWings_BaseColor.png
      ** Processing: examples/demos/qtoycustomizer/images/AngelWings_BaseColor.png
      334x334 pixels, 4x8 bits/pixel, RGB+alpha
      Reducing image to 3x8 bits/pixel, RGB
      Input IDAT size = 51645 bytes
      Input file size = 51714 bytes
      
      Trying:
        zc = 9  zm = 9  zs = 0  f = 2		IDAT size = 44696
        zc = 9  zm = 8  zs = 0  f = 2		IDAT size = 44670
        zc = 9  zm = 9  zs = 1  f = 2		IDAT size = 44589
        zc = 9  zm = 8  zs = 1  f = 2		IDAT size = 44491
                                     
      Selecting parameters:
        zc = 9  zm = 8  zs = 1  f = 2		IDAT size = 44491
      
      Output IDAT size = 44491 bytes (7154 bytes decrease)
      Output file size = 44548 bytes (7166 bytes = 13.86% decrease)
      

      Unfortunately I thought the -simulate option might produce the decrease info without modifying the file, but it doesn't, so I guess we'd need to copy the original and then run it.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            gerrit-admin Gerrit Admin
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes