[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: removing default colormap from ind2rgb and ind2gray
From: |
Carnë Draug |
Subject: |
Re: removing default colormap from ind2rgb and ind2gray |
Date: |
Sun, 2 Dec 2012 13:44:21 +0100 |
On 30 November 2012 23:31, Carnë Draug <address@hidden> wrote:
> 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.
Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/74ff287f41cb
Carnë
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: removing default colormap from ind2rgb and ind2gray,
Carnë Draug <=