Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
jpegapi.h
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:
Windows Kernel
Development Platform:
Visual C++
- /* jpegapi.h -- header file for JPEG image compression interface.
- * Written by Ajai Sehgal
- * (c) Copyright Microsoft Corporation
- *
- * 08-27-1997 (kurtgeis) Removed dependency on Gromit/Fletcher funky data
- * types and includes.
- */
- #include "jinclude.h"
- #include "jpeglib.h"
- #include "jerror.h" /* get library error codes too */
- #ifndef __JPEGAPI_H__
- #define __JPEGAPI_H__
- // kurtgeis: Moved out of Fletcher code base. Pushed exception handling down
- // into the library, so that the actual calls could return HRESULTs.
- // Class to wrap a thrown HRESULT
- class THROWN
- {
- public:
- // Default constructor
- THROWN()
- {
- m_hr = S_OK;
- }
- // THROWN( HRESULT)
- //
- // Purpose:
- // Construct a throw object for an hresult.
- //
- THROWN( HRESULT hr )
- {
- m_hr = hr;
- }
- HRESULT Hr() { return m_hr; } // The HRESULT thrown
- private:
- HRESULT m_hr; // Associated HResult;
- };
- // Destroy the JPEG handle
- HRESULT DestroyJPEGCompressHeader(HANDLE hJpegC);
- HRESULT DestroyJPEGDecompressHeader(HANDLE hJpegD);
- // Takes the parameters for a tile write and creates a JPEG table for it
- HRESULT JPEGCompressHeader(BYTE *prgbJPEGBuf, UINT tuQuality, ULONG *pcbOut, HANDLE *phJpegC, J_COLOR_SPACE ColorSpace );
- HRESULT JPEGDecompressHeader(BYTE *prgbJPEGBuf, HANDLE *phJpegD, ULONG ulBufferSize );
- // Takes a raw RGBA image buffer and spits back a JPEG data stream.
- HRESULT JPEGFromRGBA(BYTE *prgbImage, BYTE *prgbJPEGBuf,UINT tuQuality, ULONG *pcbOut, HANDLE hJpegC,J_COLOR_SPACE ColorSpace, UINT nWidth, UINT nHeight );
- // Takes a JPEG data stream and spits back a raw RGBA image buffer.
- // iraklis's comment: the second argument is the RGBA buffer to be
- // loaded with the decompressed tile; we are
- // asserting that it is of the right size (i.e. sizeof (TIL))
- HRESULT RGBAFromJPEG(BYTE *prgbJPEG, BYTE *prgbImage, HANDLE hJpegD, ULONG ulBufferSize, BYTE bJPEGConversions, ULONG *pulReturnedNumChannels, UINT nWidth, UINT nHeight );
- #endif // __JPEGAPI_H__