Commit 8304765a authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added partial implementation of GdipSaveImageToStream.

parent 6394e315
......@@ -495,7 +495,7 @@
@ stub GdipSaveAddImage
@ stdcall GdipSaveGraphics(ptr ptr)
@ stub GdipSaveImageToFile
@ stub GdipSaveImageToStream
@ stdcall GdipSaveImageToStream(ptr ptr ptr)
@ stub GdipScaleLineTransform
@ stdcall GdipScaleMatrix(ptr long long long)
@ stub GdipScalePathGradientTransform
......
......@@ -273,3 +273,16 @@ GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream* stream, GpImage **image)
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 \
gdiplusflat.h \
gdiplusgpstubs.h \
gdiplusimaging.h \
gdiplusinit.h \
gdiplusmem.h \
gdiplusmetaheader.h \
......
......@@ -33,6 +33,7 @@ namespace Gdiplus
#include "gdiplusinit.h"
#include "gdipluspixelformats.h"
#include "gdiplusmetaheader.h"
#include "gdiplusimaging.h"
#include "gdiplusgpstubs.h"
namespace DllExports
......@@ -50,6 +51,7 @@ namespace Gdiplus
#include "gdiplusinit.h"
#include "gdipluspixelformats.h"
#include "gdiplusmetaheader.h"
#include "gdiplusimaging.h"
#include "gdiplusgpstubs.h"
#include "gdiplusflat.h"
......
......@@ -152,6 +152,8 @@ GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile*,MetafileHeader
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*);
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*);
GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream*,GpImage**);
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage*,IStream*,
GDIPCONST CLSID*,GDIPCONST EncoderParameters*);
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes**);
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes*);
......
/*
* 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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment