Subversion Repositories Kolibri OS

Rev

Rev 2733 | Rev 3053 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2733 Rev 3036
Line 1... Line 1...
1
;;================================================================================================;;
1
;;================================================================================================;;
2
;;//// libimg.inc //// (c) mike.dld, 2007-2008, (c) diamond, 2009 ////////////////////////////////;;
2
;;//// libimg.inc //// (c) mike.dld, 2007-2008, (c) diamond, 2009, (c) dunkaist, 2011-2012 ///////;;
3
;;================================================================================================;;
3
;;================================================================================================;;
4
;;                                                                                                ;;
4
;;                                                                                                ;;
5
;; This file is part of Common development libraries (Libs-Dev).                                  ;;
5
;; This file is part of Common development libraries (Libs-Dev).                                  ;;
6
;;                                                                                                ;;
6
;;                                                                                                ;;
7
;; Libs-Dev is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
7
;; Libs-Dev is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
Line 30... Line 30...
30
LIBIMG_FORMAT_ID_TIFF	= 10
30
LIBIMG_FORMAT_ID_TIFF	= 10
31
LIBIMG_FORMAT_ID_PNM	= 11
31
LIBIMG_FORMAT_ID_PNM	= 11
32
LIBIMG_FORMAT_ID_WBMP	= 12
32
LIBIMG_FORMAT_ID_WBMP	= 12
33
LIBIMG_FORMAT_ID_Z80	= 13
33
LIBIMG_FORMAT_ID_Z80	= 13
Line -... Line 34...
-
 
34
 
-
 
35
; scale type
-
 
36
LIBIMG_SCALE_TYPE_STRETCH	= 0
-
 
37
LIBIMG_SCALE_TYPE_FIT_RECT	= 1
-
 
38
LIBIMG_SCALE_TYPE_FIT_WIDTH	= 2
-
 
39
LIBIMG_SCALE_TYPE_FIT_HEIGHT	= 3
-
 
40
LIBIMG_SCALE_TYPE_FIT_MAX	= 4
-
 
41
;LIBIMG_SCALE_TYPE_TILE		= 5
-
 
42
 
-
 
43
; scale algorithm
-
 
44
;LIBIMG_SCALE_ALG_DEFAULT	= 0
-
 
45
LIBIMG_SCALE_ALG_INTEGER	= 1
-
 
46
LIBIMG_SCALE_ALG_BILINEAR	= 2
-
 
47
;LIBIMG_SCALE_ALG_BICUBIC	= 3
-
 
48
;LIBIMG_SCALE_ALG_LANCZOS	= 4
34
 
49
 
35
; error codes
50
; error codes
36
LIBIMG_ERROR_OUT_OF_MEMORY = 1
51
LIBIMG_ERROR_OUT_OF_MEMORY	= 1
37
LIBIMG_ERROR_FORMAT        = 2
52
LIBIMG_ERROR_FORMAT		= 2
38
LIBIMG_ERROR_CONDITIONS    = 3
53
LIBIMG_ERROR_CONDITIONS		= 3
39
LIBIMG_ERROR_BIT_DEPTH     = 4
54
LIBIMG_ERROR_BIT_DEPTH		= 4
-
 
55
LIBIMG_ERROR_ENCODER		= 5
-
 
56
LIBIMG_ERROR_SRC_TYPE		= 6
-
 
57
LIBIMG_ERROR_SCALE_TYPE		= 7
-
 
58
LIBIMG_ERROR_SCALE_ALG		= 8
Line 40... Line 59...
40
LIBIMG_ERROR_ENCODER       = 5
59
LIBIMG_ERROR_NOT_INPLEMENTED	= 9
41
 
60
 
42
; encode flags (byte 0x02 of _common option)
61
; encode flags (byte 0x02 of _common option)
43
LIBIMG_ENCODE_STRICT_SPECIFIC  = 0x01
62
LIBIMG_ENCODE_STRICT_SPECIFIC	= 0x01
44
LIBIMG_ENCODE_STRICT_BIT_DEPTH = 0x02
63
LIBIMG_ENCODE_STRICT_BIT_DEPTH	= 0x02
Line -... Line 64...
-
 
64
LIBIMG_ENCODE_DELETE_ALPHA	= 0x08
-
 
65
LIBIMG_ENCODE_FLUSH_ALPHA	= 0x10
-
 
66
 
45
LIBIMG_ENCODE_DELETE_ALPHA     = 0x08
67
; convert flags
46
LIBIMG_ENCODE_FLUSH_ALPHA      = 0x10
68
LIBIMG_CONVERT_IN_PLACE		= 0x01	; do not create new image, store result in _src
47
 
69
 
48
struct FormatsTableEntry
70
struct FormatsTableEntry
49
  Format_id	dd ?
71
  Format_id	dd ?
Line 76... Line 98...
76
Image.bpp16 = 5
98
Image.bpp16 = 5
77
Image.bpp1  = 6
99
Image.bpp1  = 6
78
Image.bpp8g = 7  ; grayscale
100
Image.bpp8g = 7  ; grayscale
79
Image.bpp8a = 8  ; grayscale with alpha channel; application layer only!!! kernel doesn't handle this image type, libimg can only create and destroy such images
101
Image.bpp8a = 8  ; grayscale with alpha channel; application layer only!!! kernel doesn't handle this image type, libimg can only create and destroy such images
80
;Image.bpp4  = 9
102
;Image.bpp4  = 9
-
 
103
;Image.bpp2  = 10
Line 81... Line 104...
81
 
104
 
82
; bits in Image.Flags
105
; bits in Image.Flags
Line 83... Line 106...
83
Image.IsAnimated = 1
106
Image.IsAnimated = 1