-
Notifications
You must be signed in to change notification settings - Fork 9
/
helper.rb
42 lines (37 loc) · 1.07 KB
/
helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module FreeImage
#DLL_API const char *DLL_CALLCONV FreeImage_GetVersion(void);
attach_function('FreeImage_GetVersion', [], :string)
#DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
attach_function('FreeImage_GetCopyrightMessage', [], :string)
#DLL_API BOOL DLL_CALLCONV FreeImage_IsLittleEndian(void);
attach_function('FreeImage_IsLittleEndian', [], FreeImage::Boolean)
##
# :call-seq:
# version -> string
#
# Returns the current version of the FreeImage library
#
def self.version
FreeImage.FreeImage_GetVersion
end
##
# :call-seq:
# copyright -> string
#
# Returns a standard copyright message you can show in your program.
#
def self.copyright
FreeImage.FreeImage_GetCopyrightMessage
end
##
# :call-seq:
# is_little_endian? -> boolean
#
# Returns TRUE if the platform running FreeImage uses the Little Endian
# convention (Intel processors) and returns FALSE if it uses the Big Endian
# (Motorola processors).
#
def self.little_endian?
FreeImage.FreeImage_IsLittleEndian
end
end