lv_draw_buf_reshape() function
Keep using the existing memory, reshape the draw buffer to the given width and height. Return NULL if data_size is smaller than the required size.
Arguments
draw_buf
pointer to a draw buffer
cf
the new color format, use 0 or LV_COLOR_FORMAT_UNKNOWN to keep using the original color format.
h
the new height in pixels
stride
the stride in bytes for image. Use 0 for automatic calculation.