       (png_byte *)png_malloc(png_ptr, bitmap->width * pixel_size * sizeof(uint8_t));
     row_pointers[y] = row;
     for (x = 0; x < bitmap->width; ++x) {
-      Pixel* pixel = pixel_at(bitmap, x, y);
+      Pixel* pixel = pixel_at(*bitmap, x, y);
       *row++ = pixel->red;
       *row++ = pixel->green;
       *row++ = pixel->blue;


// Given "bitmap", this returns the pixel of bitmap at the point ("x", "y").
__host__ __device__
Pixel* pixel_at(Bitmap* bitmap, int x, int y) {
  return bitmap->pixels + bitmap->width * y + x;
}

/* Write "bitmap" to a PNG file specified by "path"; returns 0 on

}

__global__
void calc(Bitmap bitmap) {
  // int index = blockIdx.x * blockDim.x + threadIdx.x;
  // int stride = gridDim.x * blockDim.x;

