Browse Source

Fix compile error.

jst 9 years ago
parent
commit
45c239597b
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      resize.go

+ 4
- 4
resize.go View File

384
 		coeffs, offset, filterLength := createWeightsNearest(temp.Bounds().Dy(), taps, blur, scaleX)
384
 		coeffs, offset, filterLength := createWeightsNearest(temp.Bounds().Dy(), taps, blur, scaleX)
385
 		wg.Add(cpus)
385
 		wg.Add(cpus)
386
 		for i := 0; i < cpus; i++ {
386
 		for i := 0; i < cpus; i++ {
387
-			slice := makeSlice(temp, i, cpus).(*image.RGBA)
387
+			slice := makeSlice(temp, i, cpus).(*image.NRGBA)
388
 			go func() {
388
 			go func() {
389
 				defer wg.Done()
389
 				defer wg.Done()
390
 				nearestNRGBA(input, slice, scaleX, coeffs, offset, filterLength)
390
 				nearestNRGBA(input, slice, scaleX, coeffs, offset, filterLength)
396
 		coeffs, offset, filterLength = createWeightsNearest(result.Bounds().Dy(), taps, blur, scaleY)
396
 		coeffs, offset, filterLength = createWeightsNearest(result.Bounds().Dy(), taps, blur, scaleY)
397
 		wg.Add(cpus)
397
 		wg.Add(cpus)
398
 		for i := 0; i < cpus; i++ {
398
 		for i := 0; i < cpus; i++ {
399
-			slice := makeSlice(result, i, cpus).(*image.RGBA)
399
+			slice := makeSlice(result, i, cpus).(*image.NRGBA)
400
 			go func() {
400
 			go func() {
401
 				defer wg.Done()
401
 				defer wg.Done()
402
 				nearestNRGBA(temp, slice, scaleY, coeffs, offset, filterLength)
402
 				nearestNRGBA(temp, slice, scaleY, coeffs, offset, filterLength)
472
 		coeffs, offset, filterLength := createWeightsNearest(temp.Bounds().Dy(), taps, blur, scaleX)
472
 		coeffs, offset, filterLength := createWeightsNearest(temp.Bounds().Dy(), taps, blur, scaleX)
473
 		wg.Add(cpus)
473
 		wg.Add(cpus)
474
 		for i := 0; i < cpus; i++ {
474
 		for i := 0; i < cpus; i++ {
475
-			slice := makeSlice(temp, i, cpus).(*image.RGBA64)
475
+			slice := makeSlice(temp, i, cpus).(*image.NRGBA64)
476
 			go func() {
476
 			go func() {
477
 				defer wg.Done()
477
 				defer wg.Done()
478
 				nearestNRGBA64(input, slice, scaleX, coeffs, offset, filterLength)
478
 				nearestNRGBA64(input, slice, scaleX, coeffs, offset, filterLength)
484
 		coeffs, offset, filterLength = createWeightsNearest(result.Bounds().Dy(), taps, blur, scaleY)
484
 		coeffs, offset, filterLength = createWeightsNearest(result.Bounds().Dy(), taps, blur, scaleY)
485
 		wg.Add(cpus)
485
 		wg.Add(cpus)
486
 		for i := 0; i < cpus; i++ {
486
 		for i := 0; i < cpus; i++ {
487
-			slice := makeSlice(result, i, cpus).(*image.RGBA64)
487
+			slice := makeSlice(result, i, cpus).(*image.NRGBA64)
488
 			go func() {
488
 			go func() {
489
 				defer wg.Done()
489
 				defer wg.Done()
490
 				nearestNRGBA64(temp, slice, scaleY, coeffs, offset, filterLength)
490
 				nearestNRGBA64(temp, slice, scaleY, coeffs, offset, filterLength)