Thanks Dan. I'm just surprised that Gray16 uses big endian when, for example, Go's uint16 type uses the little endian convention.
I guess I find this weird and I want to know if there is a reason for implementing Gray16 this way. On Wed, Jan 11, 2017 at 4:40 PM, Dan Kortschak < dan.kortsc...@adelaide.edu.au> wrote: > On Wed, 2017-01-11 at 16:21 +1100, Pablo Rozas Larraondo wrote: > > I'm confused with image.Gray16 having pixel values represented in the > > wrong order. It seems to me that image.Gray16 considers numbers to be > > big endian instead of little endian. > > Why do you think that is the wrong order? > > Here is where the order is defined (yes, big endian): > > https://golang.org/src/image/image.go?s=21077:21277#L756 > > > > I've created a small playground example to illustrate this: > > https://play.golang.org/p/bhYbuIkkOz > > > > Is there something that I'm not doing right? > > > Why do you need to know the byte ordering? > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.