octave-maintainers
[Top][All Lists]
Advanced

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

removing default colormap from ind2rgb and ind2gray


From: Carnë Draug
Subject: removing default colormap from ind2rgb and ind2gray
Date: Fri, 30 Nov 2012 23:31:30 +0100

Hi

lately I have been looking at how Octave deals with indexed images and
been changing ind2rgb and ind2gray. These two functions require and
image and its colormap. In matlab, both arguments are required but
Octave defaults to "colormap()". I propose to remove this default and
like Matlab, require the user from passing both arguments.

My reasoning is that this default makes little sense since each
indexed image will have its own colormap. We can't make a guess to it,
and making one will catch unaware users by surprise. The only case in
which the guess would be correct is if the latest figure had been used
to display the image. But that would only make sense when doing
something interactive and is very prone to fail. It's just simpler and
less error prone to pass the colormap.

So, if no opposes to it, I'll soon push a commit with this change.

Carnë


reply via email to

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