Subversion Repositories Kolibri OS

Rev

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

Rev 9454 Rev 9594
Line 182... Line 182...
182
        image = EAX;
182
        image = EAX;
183
        set_vars();
183
        set_vars();
184
    }
184
    }
185
}
185
}
Line 186... Line -...
186
 
-
 
187
:dword create_image(dword type, dword width, dword height) {
-
 
188
    img_create stdcall(width, height, type);
-
 
189
    return EAX;
-
 
190
}
-
 
191
 
186
 
192
// size - output parameter, error code / the size of encoded data
187
// size - output parameter, error code / the size of encoded data
193
:dword encode_image(dword image_ptr, dword options, dword specific_options, dword* size) {
188
:dword encode_image(dword image_ptr, dword options, dword specific_options, dword* size) {
194
    img_encode stdcall(image_ptr, options, specific_options);
189
    img_encode stdcall(image_ptr, options, specific_options);
Line 201... Line 196...
201
{
196
{
202
    dword encoded_data=0;
197
    dword encoded_data=0;
203
    dword encoded_size=0;
198
    dword encoded_size=0;
204
    dword image_ptr = 0;
199
    dword image_ptr = 0;
Line 205... Line 200...
205
 
200
 
-
 
201
    img_create stdcall(_w, _h, IMAGE_BPP24);
Line 206... Line 202...
206
    image_ptr = create_image(IMAGE_BPP24, _w, _h);
202
    image_ptr = EAX;
207
 
203
 
208
    if (!image_ptr) {
204
    if (!image_ptr) {
209
        return "Error creating image!";
205
        return "Error creating image!";