Menu

#2782 gnuplot 6.0.2 has new, overly-assertive warning

None
closed-not-a-bug
nobody
None
2025-06-04
2025-03-31
dima
No

Hi. I have a gnuplot script that boils down to this:

attenuation = 10
plot "image.png" binary filetype=png flipy using ($1/attenuation):($2/attenuation):($3/attenuation) with rgbimage

Here the "using" keyword darkens the image. This has worked properly for a long time, and still works today. As of 6.0.2 I now get this warning:

"./tst.gp" line 5: warning: combining 'using' with 'binary filetype' probably does not do what you want

I think this was intended to tell the user that it isn't possible to select the x,y,z inputs with "using", but I'm not doing that here, and the warning is wrong and very distracting. Can we make the warning show up only when some part of the "using" expression actually is expected to not work?

Thanks

Discussion

  • Ethan Merritt

    Ethan Merritt - 2025-04-02

    The warning is not "over-assertive". If anything, it should give a hard error and refuse to continue. As currently coded (and I absolutely hate it) the image processing code ignores the columns given in a using specifier and instead generates values based on what it thinks the image header describes. Whatever altered display you are getting from that command may resemble what you intended, but I think that is just a lucky coincidence.

    I really wish someone would step up and replace the existing binary file handling code entirely.

    Short of that, maybe at least the image file processing could get a parallel path that uses a new keyword, perhaps a filter operation, and really does honor something like the using specs. Something like
    plot 'image.png' binary filetype=png adjust r:g:b:α

    where the idea is that first the file contents are read in as they are now and then in a separate step the color components would be modified pixel-by-pixel. I don't know exactly what the syntax would be or what restrictions it would have.

     
  • Ethan Merritt

    Ethan Merritt - 2025-04-07
    • status: open --> open-not-a-bug
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2025-06-04
    • Status: open-not-a-bug --> closed-not-a-bug
     

Log in to post a comment.

MongoDB Logo MongoDB