From: ShadowFlare Date: Fri, 6 Oct 2006 08:04:27 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://sfsrealm.hopto.org/projects/?a=commitdiff_plain;h=9492b9e609e5b7aaabd76022b65a7363a189bc72;p=grpapi.git --- diff --git a/grpapi/grpapi.cpp b/grpapi/grpapi.cpp index 6712ead..0ce1b29 100644 --- a/grpapi/grpapi.cpp +++ b/grpapi/grpapi.cpp @@ -491,10 +491,16 @@ HANDLE GRPAPI WINAPI CreateGrp(signed short *lpImageData, WORD nFrames, WORD wMa } } } + x2 = x2 - x1 + 1; + y2 = y2 - y1 + 1; + if ((WORD)x1 > 255) x1 = 255; + if ((WORD)y1 > 255) y1 = 255; + if ((WORD)x2 > 255) x2 = 255; + if ((WORD)y2 > 255) y2 = 255; lpFrameHeaders[i].Left = x1; lpFrameHeaders[i].Top = y1; - lpFrameHeaders[i].Width = x2 - x1 + 1; - lpFrameHeaders[i].Height = y2 - y1 + 1; + lpFrameHeaders[i].Width = x2; + lpFrameHeaders[i].Height = y2; if (!bNoCompress) { EncodeFrameData(lpImageData, i, &GrpHeader, &lpFrameHeaders[i], &lpFrameData[i]); diff --git a/grpapi/grpapi.vcproj b/grpapi/grpapi.vcproj index 3b7bb5e..72b773a 100644 --- a/grpapi/grpapi.vcproj +++ b/grpapi/grpapi.vcproj @@ -4,6 +4,7 @@ Version="8.00" Name="grpapi" ProjectGUID="{08812E9C-7F03-4DCB-8828-F3BDB0728EC7}" + RootNamespace="grpapi" SccProjectName=""$/grpapi_VS2005.root/grpapi", IGAAAAAA" SccLocalPath=".." SccProvider="MSSCCI:Microsoft Visual SourceSafe" @@ -31,6 +32,8 @@ />