drawgraph filter, color formats

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

drawgraph filter, color formats

Michael Koch
Hi,

I'm just making some experiments with the drawgraph filter and it took
me more than one hour to figure out what was wrong:
The colors of the graphs must be specified in format 0xAABBGGRR, but the
background color must be in format 0xRRGGBBAA.
That's very confusing!

Michael



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: drawgraph filter, color formats

Carl Eugen Hoyos-2
Am So., 3. Nov. 2019 um 00:08 Uhr schrieb Michael Koch
<[hidden email]>:

> I'm just making some experiments with the drawgraph filter and it took
> me more than one hour to figure out what was wrong:
> The colors of the graphs must be specified in format 0xAABBGGRR, but the
> background color must be in format 0xRRGGBBAA.
> That's very confusing!

Sounds like a bug to me but changing the code will break existing scripts;-(

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: drawgraph filter, color formats

Michael Koch
Am 03.11.2019 um 06:55 schrieb Carl Eugen Hoyos:

> Am So., 3. Nov. 2019 um 00:08 Uhr schrieb Michael Koch
> <[hidden email]>:
>
>> I'm just making some experiments with the drawgraph filter and it took
>> me more than one hour to figure out what was wrong:
>> The colors of the graphs must be specified in format 0xAABBGGRR, but the
>> background color must be in format 0xRRGGBBAA.
>> That's very confusing!
> Sounds like a bug to me but changing the code will break existing scripts;-(
>

Well, in the documentation is a chapter about colors and the format is
described as 0xRRGGBB[AA].
However in the documentation for the drawgraph filter is written "The
color is defined as 0xAABBGGRR". So it's impossible to use the
predefined colors in this filter.
In the documentation should be a warning that the "bg" parameter must be
in 0xRRGGBBAA format.
But in my opinion changing the code is the better solution.

Michael
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: drawgraph filter, color formats

Paul B Mahol
On 11/3/19, Michael Koch <[hidden email]> wrote:

> Am 03.11.2019 um 06:55 schrieb Carl Eugen Hoyos:
>> Am So., 3. Nov. 2019 um 00:08 Uhr schrieb Michael Koch
>> <[hidden email]>:
>>
>>> I'm just making some experiments with the drawgraph filter and it took
>>> me more than one hour to figure out what was wrong:
>>> The colors of the graphs must be specified in format 0xAABBGGRR, but the
>>> background color must be in format 0xRRGGBBAA.
>>> That's very confusing!
>> Sounds like a bug to me but changing the code will break existing
>> scripts;-(
>>
>
> Well, in the documentation is a chapter about colors and the format is
> described as 0xRRGGBB[AA].
> However in the documentation for the drawgraph filter is written "The
> color is defined as 0xAABBGGRR". So it's impossible to use the
> predefined colors in this filter.
> In the documentation should be a warning that the "bg" parameter must be
> in 0xRRGGBBAA format.
> But in my opinion changing the code is the better solution.

Code will NOT be changed.

>
> Michael
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: drawgraph filter, color formats

JackDesBwa
> > Well, in the documentation is a chapter about colors and the format is
> > described as 0xRRGGBB[AA].
> > However in the documentation for the drawgraph filter is written "The
> > color is defined as 0xAABBGGRR". So it's impossible to use the
> > predefined colors in this filter.
> > In the documentation should be a warning that the "bg" parameter must be
> > in 0xRRGGBBAA format.
> > But in my opinion changing the code is the better solution.
>
> Code will NOT be changed.

You are right!
When there is an obvious interface bug like this, especially when it
introduces inconsistency, it shall never be corrected.
PHP is a good example that this way of doing is a very successful path
without any downside at all.
Everyone should understand that code is the best specification and
bugs that don't make things crash are to be understood as special
features (that way, we gain a lot of time)
Moreover, backward compatibility is more important than correctness,
and it is up to the users to learn all the defects that might have
been introduced in the past and add extra code on his side to overcome
the corner cases of the software they use underneath.
Deprecating wrong ways to introduce nicer alternatives is so much
time-consuming that I wonder how the project which choose this can
handle the extra work.

Thus for sure, such silly proposition to correct this interesting kind
of features deserves a definitive answer with capital letters and no
explanation at all.

JackDesBwa :-/
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".