Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef __L_LIBIMG_H_INCLUDED_
  2. #define __L_LIBIMG_H_INCLUDED_
  3. //
  4. // libimg.obj
  5. //
  6.  
  7. struct Image{
  8.   long Checksum; // ((Width ROL 16) OR Height) XOR Data[0]        ; ignored so far
  9.   long Width;
  10.   long Height;
  11.   long Next;
  12.   long Previous;
  13.   long Type;     // one of Image.bppN
  14.   long Data;
  15.   long Palette;  // used iff Type eq Image.bpp1, Image.bpp2, Image.bpp4 or Image.bpp8i
  16.   long Extended;
  17.   long Flags;    // bitfield
  18.   long Delay;    // used iff Image.IsAnimated is set in Flags
  19. };
  20.  
  21. //
  22. // libimg - import table
  23. //
  24. void   (__stdcall* import_libimg)() = (void (__stdcall*)())&"lib_init";
  25. //"img_is_img";
  26. //"img_info";
  27. //"img_from_file";
  28. //"img_to_file";
  29. //"img_from_rgb";
  30. //"img_to_rgb";
  31. void   (__stdcall* img_to_rgb2)(Image* img, unsigned char* out) = (void (__stdcall*)(Image*, unsigned char*))&"img_to_rgb2";
  32. //"img_encode";
  33. Image* (__stdcall* img_decode)(unsigned char* data, long length, long options) = (Image* (__stdcall*)(unsigned char*, long, long))&"img_decode";
  34. Image* (__stdcall* img_create)(long width, long height, long type) = (Image* (__stdcall*)(long, long, long))&"img_create";
  35. bool   (__stdcall* img_destroy)(Image* img) = (bool (__stdcall*)(Image*))&"img_destroy";
  36. //"img_destroy_layer";
  37. //"img_count";
  38. //"img_lock_bits";
  39. //"img_unlock_bits";
  40. //"img_flip";
  41. //"img_flip_layer";
  42. //"img_rotate";
  43. //"img_rotate_layer";
  44. //"img_draw";
  45. //"img_scale";
  46. //"img_get_scaled_size";
  47. Image* (__stdcall* img_convert)(Image* src, Image* dst, long dst_type, long flags, long param) = (Image* (__stdcall*)(Image*, Image*, long, long, long))&"img_convert";
  48. //"img_formats_table";
  49. asm{
  50.         dd 0,0
  51. }
  52.  
  53. #endif