Encode the provided image and return the resulting bytes. @param image image to encode @return nullptr if the pixels could not be read or encoding otherwise fails.
(@NotNull Image image)
| 11 | * @return nullptr if the pixels could not be read or encoding otherwise fails. |
| 12 | */ |
| 13 | @Nullable |
| 14 | public static Data encode(@NotNull Image image) { |
| 15 | return encode(null, image, EncodeJPEGOptions.DEFAULT); |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Encode the provided image and return the resulting bytes. |