Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(302)

Unified Diff: src/pkg/image/png/writer.go

Issue 5136050: code review 5136050: This changes are due to change in the color.go file. Ne...
Patch Set: diff -r 6c5c19791fae https://code.google.com/p/go/ Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/image/png/reader_test.go ('k') | src/pkg/image/png/writer_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/image/png/writer.go
===================================================================
old mode 100644
new mode 100755
--- a/src/pkg/image/png/writer.go
+++ b/src/pkg/image/png/writer.go
@@ -315,11 +315,11 @@
cr0 := cr[0]
if rgba, _ := m.(*image.RGBA); rgba != nil {
j0 := (y - b.Min.Y) * rgba.Stride
- j1 := j0 + b.Dx()*4
- for j := j0; j < j1; j += 4 {
- cr0[i+0] = rgba.Pix[j+0]
- cr0[i+1] = rgba.Pix[j+1]
- cr0[i+2] = rgba.Pix[j+2]
+ j1 := j0 + b.Dx()
+ for j := j0; j < j1; j += 1 {
+ cr0[i+0] = rgba.Pix[j].R
+ cr0[i+1] = rgba.Pix[j].G
+ cr0[i+2] = rgba.Pix[j].B
i += 3
}
} else {
« no previous file with comments | « src/pkg/image/png/reader_test.go ('k') | src/pkg/image/png/writer_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b