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

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

[Octave-bug-tracker] [bug #51264] imread incorrect results (vs python ma


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #51264] imread incorrect results (vs python matlab results)
Date: Thu, 29 Jun 2017 12:15:11 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #6, bug #51264 (project octave):

If an image pixel has the same value in all colour channels, GM may
report it as being grayscale (I think this is coder, i.e. format,
dependent).  If the number of unique colours is small enough, it may
even report it as being an indexed image.  This is just how GM works,
it optimises for memory usage at the cost that we can't get the real
pixel values.

It is true that we can get back format specific values from GM but
then we are back at writing format specific code which defeats the
point of using GM in the first place.  For what is worth, this is
already done in a few cases so more counter-guessing GM about an image
being grayscale/RGB/transparency should be done here:

http://hg.savannah.gnu.org/hgweb/octave/file/69a111259a2c/libinterp/corefcn/__magick_read__.cc#l430

Counter guessing GM about whether it is an indexed image should be
done here instead:

http://hg.savannah.gnu.org/hgweb/octave/file/69a111259a2c/libinterp/corefcn/__magick_read__.cc#l45


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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