You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

JpegDecompressor.h 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2000-2003 Constantin Kaplinsky. All Rights Reserved.
  2. * Copyright (C) 2004-2005 Cendio AB. All rights reserved.
  3. * Copyright (C) 2011 D. R. Commander. All Rights Reserved.
  4. *
  5. * This is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This software is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this software; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  18. * USA.
  19. */
  20. //
  21. // JpegDecompressor decompresses a JPEG image into RGB output
  22. // an underlying MemOutStream
  23. //
  24. #ifndef __RFB_JPEGDECOMPRESSOR_H__
  25. #define __RFB_JPEGDECOMPRESSOR_H__
  26. #include <rfb/PixelFormat.h>
  27. #include <rfb/Rect.h>
  28. struct jpeg_decompress_struct;
  29. struct JPEG_ERROR_MGR;
  30. struct JPEG_SRC_MGR;
  31. namespace rfb {
  32. class JpegDecompressor {
  33. public:
  34. JpegDecompressor(void);
  35. virtual ~JpegDecompressor();
  36. void decompress(const rdr::U8 *, int, rdr::U8 *, int, const Rect&,
  37. const PixelFormat&);
  38. private:
  39. struct jpeg_decompress_struct *dinfo;
  40. struct JPEG_ERROR_MGR *err;
  41. struct JPEG_SRC_MGR *src;
  42. };
  43. } // end of namespace rfb
  44. #endif