 
     // Create dst bitmap image (empty for now)
     *dst_bitmap = createBitmap((*src_bitmap)->width, (*src_bitmap)->height, (*src_bitmap)->depth);
-    assert(*dst_bitmap != NULL && "Error: could not allocate memory for dst_bitmap");
+    assert((*dst_bitmap != NULL) && "Error: could not allocate memory for dst_bitmap");
 
     printf("image information\n");
     printf("=================\n");

    // save 8-bit binary-valued grayscale version of dst_bitmap to dst_fname
    binary_to_grayscale(*dst_bitmap);
    int save_successful = saveBitmap(dst_fname, *dst_bitmap);
    assert(save_successful == 1 && "Error: could not save dst_bitmap");

    // free memory used for bitmaps
    free(*src_bitmap);

// Pads the binary image given as input with the padding values provided as
// input. The padding value must be a binary white (0) or black (1).
void pad_binary_bitmap(Bitmap** image, uint8_t binary_padding_value, Padding padding) {
    assert((*image != NULL) && "Error: Bitmap must be non-NULL");
    assert(is_binary_image(*image) && "Error: Must supply a binary image as input: only black (1) and white (0) are allowed");
    assert((binary_padding_value == BINARY_BLACK || binary_padding_value == BINARY_WHITE) && "Error: Must provide a binary value for padding");

