1
0

writer_jpg.h 807 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <api/service/svcs/svc_imgwrite.h>
  3. // {7BC27468-0475-4c0d-AEED-0C51195DC2EA}
  4. static const GUID JPEGwriteguid =
  5. { 0x7bc27468, 0x475, 0x4c0d, { 0xae, 0xed, 0xc, 0x51, 0x19, 0x5d, 0xc2, 0xea } };
  6. class JpgWrite : public svc_imageWriter
  7. {
  8. public:
  9. JpgWrite();
  10. static const char *getServiceName() { return "JPEG writer"; }
  11. static GUID getServiceGuid() { return JPEGwriteguid; }
  12. const wchar_t * getImageTypeName() { return L"JPEG"; }
  13. const wchar_t * getExtensions() { return L"jpg;jpeg"; }
  14. int setConfig(const wchar_t * item, const wchar_t * value);
  15. int getConfig(const wchar_t * item, wchar_t * value, int valuelen);
  16. int bitDepthSupported(int depth);
  17. void * convert(const void *pixels, int bitDepth, int w, int h, int *length);
  18. protected:
  19. RECVS_DISPATCH;
  20. int quality;
  21. };