' ########################################################################################
' Microsoft Windows
' File: ImageTranscode.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
' ########################################################################################
' Exposes a method that allows conversion to JPEG or bitmap (BMP) image formats from any
' image type supported by Microsoft Windows.
' Minimum DLL Version: photometadatahandler.dll
' Minimum operating systems: Windows Vista
' ########################################################################################
#IF NOT %DEF(PBX_ImageTranscode_PBI)
#DEFINE PBX_ImageTranscode_PBI
%EQUATE `IMAGETRANSCODE_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
#INCLUDE ONCE "Legacy/System/PropIdl.inc"
#INCLUDE ONCE "Legacy/COM/ShObjIdl.inc"
$CLSID_ImageTranscode = GUID$("{17B75166-928F-417D-9685-64AA135565C1}")
$IID_ITranscodeImage = GUID$("{BAE86DDD-DC11-421C-B7AB-CC55D1D65C44}")
' enum TI_FLAGS
%EQUATE `TI_BITMAP = 1
%EQUATE `TI_JPEG = 2
' ########################################################################################
' Interface name = ITranscodeImage
' IID = BAE86DDD-DC11-421C-B7AB-CC55D1D65C44
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITranscodeImage_INTERFACE_DEFINED)
 %ITranscodeImage_INTERFACE_DEFINED = 1
INTERFACE ITranscodeImage $IID_ITranscodeImage
 INHERIT IUnknown
 ' =====================================================================================
 METHOD TranscodeImage ( ' VTable offset = 12
 BYVAL pShellItem AS IShellItem
 , BYVAL uiMaxWidth AS DWORD
 , BYVAL uiMaxHeight AS DWORD
 , BYVAL flags AS DWORD
 , BYVAL pvImage AS IStream
 , BYREF puiWidth AS DWORD
 , BYREF puiHeight AS DWORD
 ) ' void
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITranscodeImage_INTERFACE_DEFINED__ */
#ENDIF
