Vips
Crystal equivalent of the subset of the ruby-vips gem that image_processing relies on: libvips initialization, GType helpers, enum translation and loader/saver lookup.
Constants
BLOB_TYPE = begin
init!
gtype = LibVips.g_type_from_name("VipsBlob")
if gtype == 0
raise(Error.new("unknown type: VipsBlob"))
end
gtype
end
GType of VipsBlob (same as ruby-vips' Vips::BLOB_TYPE). The type is only registered once libvips is initialized, so resolve it lazily on first access (Crystal constants with runtime initializers are deferred).
G_TYPE_BOOLEAN = 20_u64
G_TYPE_BOXED = 72_u64
G_TYPE_CHAR = 12_u64
G_TYPE_DOUBLE = 60_u64
G_TYPE_ENUM = 48_u64
G_TYPE_FLAGS = 52_u64
G_TYPE_FLOAT = 56_u64
G_TYPE_INT = 24_u64
G_TYPE_INT64 = 40_u64
G_TYPE_INTERFACE = 8_u64
G_TYPE_INVALID = 0_u64
Fundamental GType ids (gtype.h, ABI-stable).
G_TYPE_LONG = 32_u64
G_TYPE_NONE = 4_u64
G_TYPE_OBJECT = 80_u64
G_TYPE_PARAM = 76_u64
G_TYPE_POINTER = 68_u64
G_TYPE_STRING = 64_u64
G_TYPE_UCHAR = 16_u64
G_TYPE_UINT = 28_u64
G_TYPE_UINT64 = 44_u64
G_TYPE_ULONG = 36_u64
G_TYPE_VARIANT = 84_u64
MAX_COORD = 10000000
Coordinate value that means "unlimited" for thumbnail dimensions.
Class methods
array_double_type
Sourcearray_image_type
Sourcearray_int_type
Sourceblob_type
SourceTranslates an enum integer back into its nickname.
Translates an enum member given as Symbol/String into its integer value.
Translates a flags member given as Symbol/String into its integer value.
image_type
Sourceinit!
Sourceref_string_type
Sourceversion
Source