Menu

#14 Add "c" "f" "d" switches known from PNGOUT - force output @@

open
None
3
2010-02-28
2010-01-16
dos386
No

PNGOUT has

"c" - force colour model
"f" - force filter
"d" - force bitdepth (c0 and c3 only)

IMHO very useful for manual evaluation and testing PNG decoders.

OPTIPNG has just "nb" and "nc" (much weaker than "c" and "d") , and also "f" but it conflicts with "o"

"-o7 -f3" should take the "o7" brute-forcing model and remove the brute-forcing on "f" thus leaving 40 attempts.

Discussion

  • Cosmin Truta

    Cosmin Truta - 2010-02-28

    Dear A.B.,
    Thank you very much for your suggestions.

    I have already considered implementing support for selecting the bit depth and color type. If you try "optipng -b8" or "optipng -c3", you will see that the options are recognized, but you're getting a "not implemented" error message.

    As for the option -f, you can make it work as you want it, provided that you do not mix it with -o. This is because -o is nothing but a macro-option; for example, -o2 literally means -zc9 -zm8 -zs0-3 -f0,5. Combining -o2 with -f3 will essentially mean combining -f0,5 with -f3, which results in -f0,3,5. If you want -f3 only, you will have to not use -o, but do the whole combination yourself: -zc9 -zm8 -zs0-3 -f3.

    If you don't use -o at all, then you will have the default -f0,5 replaced with -f3, and it will work as you expect it to work.

    As you can see, the possibilities offered this way are actually more sophisticated. They are, admittedly, more difficult to use, but this is done under the assumption that, if you insist on using -f3, you are an advanced user, you know exactly what you are doing, and don't mind specifying exactly (and completely) what exactly do you need.

    I am, however, accepting your request, in recognition of the fact that the options -b and -c are indeed needed, and they aren't just my ideas.

    Best regards,
    Cosmin

     
  • Cosmin Truta

    Cosmin Truta - 2010-02-28
    • priority: 5 --> 3
    • assigned_to: nobody --> cosmin
     

Log in to post a comment.