// NewRGBA returns a new RGBA with the given width and height.
func NewRGBA(w, h int) *RGBA {
pixel := make([][]RGBAColor, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]RGBAColor, w)
}
return &RGBA{pixel};
// NewRGBA64 returns a new RGBA64 with the given width and height.
func NewRGBA64(w, h int) *RGBA64 {
pixel := make([][]RGBA64Color, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]RGBA64Color, w)
}
return &RGBA64{pixel};
// NewNRGBA returns a new NRGBA with the given width and height.
func NewNRGBA(w, h int) *NRGBA {
pixel := make([][]NRGBAColor, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]NRGBAColor, w)
}
return &NRGBA{pixel};
// NewNRGBA64 returns a new NRGBA64 with the given width and height.
func NewNRGBA64(w, h int) *NRGBA64 {
pixel := make([][]NRGBA64Color, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]NRGBA64Color, w)
}
return &NRGBA64{pixel};
// NewPaletted returns a new Paletted with the given width, height and palette.
func NewPaletted(w, h int, m PalettedColorModel) *Paletted {
pixel := make([][]uint8, h);
- for y := 0; y < int(h); y++ {
+ for y := 0; y < h; y++ {
pixel[y] = make([]uint8, w)
}
return &Paletted{pixel, m};