octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52401] color images too dark wth graphics_too


From: anonymous
Subject: [Octave-bug-tracker] [bug #52401] color images too dark wth graphics_toolkit gnuplot
Date: Mon, 13 Nov 2017 12:10:50 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

URL:
  <http://savannah.gnu.org/bugs/?52401>

                 Summary: color images too dark wth graphics_toolkit gnuplot
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 13 Nov 2017 05:10:48 PM UTC
                Category: Plotting with gnuplot
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: R.S:Carmenes
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Hello,

Color images are far too dark when shown and exported using graphics_toolkit
gnuplot. This equally affects imshow and imagesc, as well as any subsequent
print, at least with octave 4.0.3 to 4.2.1, and with gnuplot 5.2.0 or later,
including the current cvs version. However, colors are correctly shown with
gnuplot 5.0.7 or earlier. Gray and B&W images are unaffected.

The following code reproduces the problem and generates a gnuplot file for
testing.


graphics_toolkit gnuplot
I=uint8(zeros(16,16,3));
for i=1:16; I(i,:,1)=i*16-1; end
for i=1:16; I(:,i,2)=i*16-1; end
for i=1:16; I(:,i,3)=[i-1:15,0:i-2]*16+15; end
imshow(I)
drawnow('x11','/dev/null','debug.gp')


After investigating, all this is due to the change introduced in gnuplot 5.2.0
regarding the use of cbrange. See the gnuplot ChangeLog:


2017-08-22  Dima Kogan  <address@hidden>

        * src/plot2d.c src/plot3d.c src/graphics.c (process_image):
        Do not apply cbrange to rgbimage data.  Do not use rgbimage range to
        autoscale cbrange.  For now this means that rgbimage color components
        must be in the range [0:255], as they are for png, jpeg, etc.


Currently, octave uses set cbrange [1:64]; but this has no effect on rgb
images since gnuplot 5.2, resulting in dark color images with any output
device when handled through the gnuplot engine. Therefore octave should be
updated to cope with the new gnuplot specifications.

The fltk graphics toolkit shows color images correctly but seems unable to
export them, so it is not (yet) a valid solution (at least for me).

Hope this can be fixed.

Ricardo.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52401>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]