gdiplus: Added partial implementation of GdipSaveImageToStream.
This commit is contained in:
parent
6394e315cf
commit
8304765abd
|
@ -495,7 +495,7 @@
|
||||||
@ stub GdipSaveAddImage
|
@ stub GdipSaveAddImage
|
||||||
@ stdcall GdipSaveGraphics(ptr ptr)
|
@ stdcall GdipSaveGraphics(ptr ptr)
|
||||||
@ stub GdipSaveImageToFile
|
@ stub GdipSaveImageToFile
|
||||||
@ stub GdipSaveImageToStream
|
@ stdcall GdipSaveImageToStream(ptr ptr ptr)
|
||||||
@ stub GdipScaleLineTransform
|
@ stub GdipScaleLineTransform
|
||||||
@ stdcall GdipScaleMatrix(ptr long long long)
|
@ stdcall GdipScaleMatrix(ptr long long long)
|
||||||
@ stub GdipScalePathGradientTransform
|
@ stub GdipScalePathGradientTransform
|
||||||
|
|
|
@ -273,3 +273,16 @@ GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream* stream, GpImage **image)
|
||||||
|
|
||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream* stream,
|
||||||
|
GDIPCONST CLSID* clsid, GDIPCONST EncoderParameters* params)
|
||||||
|
{
|
||||||
|
if(!image || !stream)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
/* FIXME: CLSID, EncoderParameters not used */
|
||||||
|
|
||||||
|
IPicture_SaveAsFile(image->picture, stream, FALSE, NULL);
|
||||||
|
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
|
@ -167,6 +167,7 @@ SRCDIR_INCLUDES = \
|
||||||
gdiplusenums.h \
|
gdiplusenums.h \
|
||||||
gdiplusflat.h \
|
gdiplusflat.h \
|
||||||
gdiplusgpstubs.h \
|
gdiplusgpstubs.h \
|
||||||
|
gdiplusimaging.h \
|
||||||
gdiplusinit.h \
|
gdiplusinit.h \
|
||||||
gdiplusmem.h \
|
gdiplusmem.h \
|
||||||
gdiplusmetaheader.h \
|
gdiplusmetaheader.h \
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace Gdiplus
|
||||||
#include "gdiplusinit.h"
|
#include "gdiplusinit.h"
|
||||||
#include "gdipluspixelformats.h"
|
#include "gdipluspixelformats.h"
|
||||||
#include "gdiplusmetaheader.h"
|
#include "gdiplusmetaheader.h"
|
||||||
|
#include "gdiplusimaging.h"
|
||||||
#include "gdiplusgpstubs.h"
|
#include "gdiplusgpstubs.h"
|
||||||
|
|
||||||
namespace DllExports
|
namespace DllExports
|
||||||
|
@ -50,6 +51,7 @@ namespace Gdiplus
|
||||||
#include "gdiplusinit.h"
|
#include "gdiplusinit.h"
|
||||||
#include "gdipluspixelformats.h"
|
#include "gdipluspixelformats.h"
|
||||||
#include "gdiplusmetaheader.h"
|
#include "gdiplusmetaheader.h"
|
||||||
|
#include "gdiplusimaging.h"
|
||||||
#include "gdiplusgpstubs.h"
|
#include "gdiplusgpstubs.h"
|
||||||
|
|
||||||
#include "gdiplusflat.h"
|
#include "gdiplusflat.h"
|
||||||
|
|
|
@ -152,6 +152,8 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile*,MetafileHeader
|
||||||
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*);
|
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*);
|
||||||
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*);
|
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*);
|
||||||
GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream*,GpImage**);
|
GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream*,GpImage**);
|
||||||
|
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage*,IStream*,
|
||||||
|
GDIPCONST CLSID*,GDIPCONST EncoderParameters*);
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**);
|
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**);
|
||||||
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*);
|
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*);
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2007 Google (Evan Stade)
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _GDIPLUSIMAGING_H
|
||||||
|
#define _GDIPLUSIMAGING_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
class EncoderParameter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GUID Guid;
|
||||||
|
ULONG NumberOfValues;
|
||||||
|
ULONG Type;
|
||||||
|
VOID* Value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class EncoderParameters
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
UINT Count;
|
||||||
|
EncoderParameter Parameter[1];
|
||||||
|
};
|
||||||
|
#else /* end of c++ typedefs */
|
||||||
|
|
||||||
|
typedef struct EncoderParameter
|
||||||
|
{
|
||||||
|
GUID Guid;
|
||||||
|
ULONG NumberOfValues;
|
||||||
|
ULONG Type;
|
||||||
|
VOID* Value;
|
||||||
|
} EncoderParameter;
|
||||||
|
|
||||||
|
typedef struct EncoderParameters
|
||||||
|
{
|
||||||
|
UINT Count;
|
||||||
|
EncoderParameter Parameter[1];
|
||||||
|
} EncoderParameters;
|
||||||
|
|
||||||
|
#endif /* end of c typedefs */
|
||||||
|
|
||||||
|
#endif /* _GDIPLUSIMAGING_H */
|
Loading…
Reference in New Issue