Creates a new bitmap, scaled from an existing bitmap, when possible. If the specified width and height are the same as the current width and height of the source bitmap, the source bitmap is returned and no new bitmap is created.
Parameters: src: The source bitmap. dstWidth: The new bitmap's desired width. dstHeight: The new bitmap's desired height. filter: True if the source should be filtered.
Returns in pixels() a copy of the data in the bitmap. Each value is a packed int representing a Color. The stride parameter allows the caller to allow for gaps in the returned pixels array between rows. For normal packed results, just pass width for the stride value.
Parameters: pixels: The array to receive the bitmap's colors offset: The first index to write into pixels() stride: The number of entries in pixels() to skip between rows (must be >= bitmap's width). Can be negative. x: The x coordinate of the first pixel to read from the bitmap y: The y coordinate of the first pixel to read from the bitmap width: The number of pixels to read from each row height: The number of rows to read