187,8 → 187,14 |
return EAX; |
} |
|
:dword save_image(dword _image_pointer, _w, _h, _path) |
#ifdef LANG_RUS |
#define TEXT_FILE_SAVED_AS "' ©« á®åà ¥ ª ª " |
#else |
#define TEXT_FILE_SAVED_AS "'File saved as " |
#endif |
:void save_image(dword _image_pointer, _w, _h, _path) |
{ |
char save_success_message[4096+200]; |
dword encoded_data=0; |
dword encoded_size=0; |
dword image_ptr = 0; |
195,8 → 201,8 |
|
image_ptr = create_image(IMAGE_BPP24, _w, _h); |
|
if (!image_ptr) { |
return "Error creating image!"; |
if (image_ptr == 0) { |
notify("'Error saving file, probably not enought memory!' -E"); |
} |
else { |
EDI = image_ptr; |
206,15 → 212,18 |
|
img_destroy stdcall(image_ptr); |
|
if(!encoded_data) { |
return "Error encoding image!"; |
if(encoded_data == 0) { |
notify("'Error saving file, incorrect data!' -E"); |
} |
else { |
if (!CreateFile(encoded_size, encoded_data, _path)) { |
return 0; |
if (CreateFile(encoded_size, encoded_data, _path) == 0) { |
strcpy(#save_success_message, TEXT_FILE_SAVED_AS); |
strcat(#save_success_message, _path); |
strcat(#save_success_message, "' -O"); |
notify(#save_success_message); |
} |
else { |
return "'Error saving image file!\nNot enough space? Path wrong?\nFile system is not writable?..' -E"; |
notify("'Error saving image file!\nNot enough space? Path wrong?\nFile system is not writable?..' -E"); |
} |
} |
} |