octave-maintainers
[Top][All Lists]
Advanced

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

RE: ind2rgb - Enabling handling of ND images


From: adam aitkenhead
Subject: RE: ind2rgb - Enabling handling of ND images
Date: Thu, 4 Apr 2013 07:31:59 +0000

> The patch looks good. I am only bothered by minor stylistic issues.
>
> 1) It needs a commit message:
>
> http://wiki.octave.org/Commit_message_guidelines
>
> Look at "hg log -v" to look at other examples of commit
> messages.
>
> 2) The traditional variable name is "sz = size (x)", not "xdim".
>
> 3) Instead of
>
> R = vertcat (R(:), G(:), B(:));
> R = reshape (R, horzcat (xdim, 3));
>
> I would write
>
> R = reshape ([R(:); G(:); B(:)], [sz, 3]);
>
> or even, to be visually suggestive,
>
> R = reshape ([R(:)
> G(:)
> B(:)], [sz, 3]);
>
> I just find that using [a; b] or [a, b] is easier to read than
> horzcat or vertcat. If you think my version is less readable,
> keep yours.
>
> If you can prepare a modified patch, please upload it to our patch
> tracker:
>
> https://savannah.gnu.org/patch/?func=additem&group=octave
>
> If you're currently standing on your patch (hg up -r 486ebe96d), you
> may want to use, after making your changes, the following:
>
> hg commit --amend
>
> to amend your current patch.
>
> Looking forward to your contribution,
> - Jordi G. H.


Great, thanks for the pointers.  I'll give it a go either this evening or at 
the weekend, whenever I have some free time.                                    
     

reply via email to

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