mirror of https://github.com/GNOME/gimp.git
app: add macro GIMP_IMAGE_TYPE_FROM_BYTES() (ignoring indexed mode)
This commit is contained in:
parent
ca85d2c906
commit
f086e27846
|
@ -57,6 +57,10 @@
|
|||
(t) == GIMP_GRAY_IMAGE ? 1 : \
|
||||
(t) == GIMP_INDEXEDA_IMAGE ? 2 : \
|
||||
(t) == GIMP_INDEXED_IMAGE ? 1 : -1)
|
||||
#define GIMP_IMAGE_TYPE_FROM_BYTES(b) ((b) == 4 ? GIMP_RGBA_IMAGE : \
|
||||
(b) == 3 ? GIMP_RGB_IMAGE : \
|
||||
(b) == 2 ? GIMP_GRAYA_IMAGE : \
|
||||
(b) == 1 ? GIMP_GRAY_IMAGE : -1)
|
||||
#define GIMP_IMAGE_TYPE_BASE_TYPE(t) (((t) == GIMP_RGB_IMAGE || \
|
||||
(t) == GIMP_RGBA_IMAGE) ? \
|
||||
GIMP_RGB : \
|
||||
|
|
Loading…
Reference in New Issue