???? ID: 319061 - ????? ???????: 04 ?????? 2010 - ??????: 2.0 ????? C# ?? ????? ?? ?? ??? ??? ?????? ?? ??? ???. GIF ????? ?????? ?? ??? ???? ????
?? ????? ??????????? ?????? ??? ????????? 256 ????? ?? ?????? ?? ??? CompuServe ????????? ???????? ??????? (GIF) ?? ??????? ???? ??? ??? ???. GIF ????? ?? ??? ??????? ?????? ???? ?? ???, ???? ????? ??? ?????? ????????? ???? ?????? ??? ???????, ??System.Drawing?????? ????????????? ?? ???? ??? GIF ??????? ?? ??? ??? ?????? ?? ??? ??? ?? ??? ????. GIF ????? ?? ?? ?????? ??? ?????? ??? ???? ?????? ?? ??? ????????? ????? ??? ?????? GIF ??????? ?? ????? ???? ???, ?? ??? ?? ?? ?? 256-??? ?? ????????? ?? ??? ????? ???? ?????????System.Drawing??? ??????? ???? ??? ???? ?????? ???? ??. GIF ????? ?? ?????System.Drawing, ??GDI+.???. GIF ????? ?????? 256 ????? ?? ????????? ?? ???? ???? Because color is a scarce resource in the .gif file, optimizing those colors is a commonly requested task. To affect an optimized color table, you must be able to set any arbitrary custom color table in a .gif file.TheSystem.Drawingnamespace is primarily a wrapper around GDI+, therefore this article refers to the namespace as GDI+ unless behavior that is specific to theSystem.Drawingnamespace is discussed, in which case, the termSystem.Drawing????? ??? ??? After GDI+ modifies an????? ??? ??? GIF ???????, GDI + ?? ????? ?? ???? ???? ?? ???? writes ?? ???? ?? ??? ??? ?????? ??????? ?? ????? ???? ????? ????? ????????????? ?? ????? ??? ?? ?? ???? ??? ??? GDI + ?? (32 BPP) ??????? ????? 32 ????? ??? ?? ???? ??? ??????? ????? ?? ?? ?? ??? ????? ?? ??? ??????? GDI + 32-BPP ????????? ???? ???? ??? ?? ??? ??? ?????? ??? ?? ???? ?????? GDI + ?? ??????? ?? ????????????, ????????????????? ??????? ?????? ?? ??? ?? ????? ??? ????. gif ???, 32-BPP ????????? ???? ?? ????? necessitates ??????? 32 BPP ???? ?? ??? ?? ?? GDI + ?????? ??????? ???? ??? ???????, ???????,?????????????????? ??????? GDI + ???? ??? ??????? ?????? retains ?? ?? ????? ????? ???? ?? ??? ???? ?? ????????????????? ??????? ?? ??? ?????? ??? ??? ?? ??????? ?? ???? ??? ???? ???? ??? ?? ?? ????? ?? ??? ??????????? ??? ?????? ?? ???. GIF ?????? ????. GIF ????? ?? ?? ????? ??? ?????? ?? ??? ??? ??? ????? unmodified ??? ??????????with the GIF encoder and keep the??????color table intact; therefore, you can use this method to save a .gif file with a new color table.The method is to copy the image data from an original???object to a temporary?????????????? ??? This temporary??????is created as an 8-BPP indexed??????, which is the pixel format that is used to save a .gif file. The??????color table is set by using theSetPalettemethod, and then the image definition is copied to the temporary??????. After you create the temporary????????? ????????? ??????? ?? ??? ?? ?? ????? ?? ???? ???Save()GIF ???????, 8-BPP ??? ?????? ?? ???????? ???? ?? ????? ??? ?????? ?? ??? ?????? ??? ????? ??? ?????? ?? ??? ??? ????? ?? ??? ???. gif ??? ?????, ?? ????? ?? ???? ????:
????? ??? ?? ????? ????????????? ???? ?? ?? ??? ??? ????? ??? ?? ?? ????? ???? ????Bitmap.Save????? ??? ?????? arbitrary ???? ?? ???. GIF ????? ????? ??? ??? ???????? ?? ??? ???????? ???? ?? ??????? ?? ???? ???????? ?? ??? ???? ???????? ??? ??????? ?? ??? ??????? opportunities ??????? loops ?? ????????? ??? ????GetPixel??????? ?????? ?? ???? ????????? ????????????? ??, ????? remarkably ???? ??? ???? ????? ??? ???? ???? ??? ?????? ????? ???? ??? ??LockBits??????? ?????? ???? ?? ????? ??? ??? ??????, ?? ??? ????? ? ????GetPixel???? ????????? ?????????????? ??????????? ?? ??????? ?? ??? ???????? ??? ?? ?? ????? ???? ???, ???? ????? ???????? ?????? ????????? ??????? ??????????????? ?????? ????? ??? ???????? ???? ??:
????? ?? ???. GIF ?????, ?? 8 BPP ??????? ???? ??????????????? ?? ??? ???? ?? ???? ?? ??? ??????? ?? ??? ???????? ??? ????? ??? ??? ?? ???????? ??? loops ?? ?? ????? ???? ?? ??? ??? essentially ?????-????? TV ??? ????? ?? ??? ??? ???? ??? ??? ?????? ????? ???????? ?? ????????, ?? ??? ????? ??? ??????? ??? ?????? ?? means ??GetPixel()?? ?????? ???????????????? ?? ????? ??? ?? ????????? ??? A??????????????? ??? ?? ?? ?????????????? ?? ??????????? ????GetPixel()?????? ??? ???????, ???? ???? ????? ?? ????? ???? ??????? ?? ??????? ?? ??? ?? ???? ??????? ?? ????? ?? ????LockBits()?????? ?? ??? ????????? ??? ?? ????? ?? ?? ??? interopWindows GDI DIB ????????. ?? ?? ????? ????BitBlt?????? ?? ?? ?????? ???? ?? ??? ??? GDI DIB ?????? ?? ??? HDC Gdi + ?? ????????? ????? ?? ??? ?????? ????? ????????GBitBlt?????? ??? ?? GDI abilities ?? ??? ???? ?? ????? ???? ??? ?? ?? ????????????? ????????? ?????, ?? ????? ???????????? ??? ????ImageFormat.gif?????? ?? ?????? ???? ?? ????? ?? ??? ???????? ??? ?? ?? 256 ????? ?? ??? GIF ?????GDI + 1.0 ??????? ??? GIF ????? encodes ???? GDI +???????? 8 BPP ???? ???? ???????????? ????????? ???? ?? ???? ??? ?????? ???? ???? ?? ??? 8 BPP ?? ????? ????????????????? GIF ????? ??????? 8-BPP ?? ?? 256 ????? ?? ???. gif ?????? ????? ?? ??? ?????????????????? ?? ?? 256 ????? ??? ????????Palette.count????GIF ????? ?? ???? ??? ???? ??????? ?? ??? ????? "??????"?? ???? ?? ???? ???????????,ColorPalette?? ????System.Drawing.NET Framework ??? ??? ????? ?? ???????? ???? ?? ???? ????????????????? ??? ?? ???? ???? ???????? ??System.Drawing.Bitmap???? imposes ??? .NET Framework; ???????, ?? ???? ??? approach ?? ????? ???? ?? ????????????????? ???? ?? ???? ?????ColorPalette??????? 256 ?? ?? ????? ??? ????????ColorPalette. ?? ????? ???? ?? ??? ????? ??? ?? ????????? ??? ?????? ?? ???GetColorPalette. ?? ?????? ?? ?? ??????? ????? ???????????????? ???????? ????? ?? ?????? ?? ???? ?? ??? ????? ??? ??? ?????? ?? ?????? ????????????? ?? ???? ???? ???? ??? ?? ?? ??? ????? ??ColorPalette?? ??????? ??? ?? ??? ???? ?????: 256 ?????, 16 ?????, ?? ?? ??? (?????????)? ??????? ?? ??? ???????? ??? 256 ????? ?? ???? ??. GIF ????? ??? ???? ???, ??? ???????? ???? ?? ??? ?? ???? ???? ???? ?? ????? ???? ?? ?? ?? ??? ?? ???? ???? ?? ??? ??? ?????? ???? ?? ????? ???, ?? ?? wasted ????? ???? ??? ?? ?????? ??? ??? ???? ??? ?????? ??? 8 ??? (2 x 2 x 2) ??? ????? ??? ?? ???. GIF ????? ???? ????? ?? ??? ?????? 16 ????? ?? ??? ??????? ???? ???? ??PixelFormat?? ??? ??????????? accomodates ????? ??? ??? 8-BPP ???? ?? ??? ??????? ????????? ?? ??? ?? ????????? ????? ?? ?? ?????? ??? ??? ????????????? ?? ???? ??? ??????? ?? ???? ?? ??? computes ??????????? ??? ?? ?? ???????? GIF ????? ??????? ?? ???? ?? ????? ???? ?? ?? ??????????? ??? ?? ?? 256 ????? ?? ???. GIF ????? ????? ??? ???? ???, ?? ??????? ???? (??????, ??????? GIF ??? ??????) ?? ??? ???? ??? ?? ???? ?? ??? ??? ??????? ?? ?????????? ???? ??? GIF ??????????????? ??? ???ColorPalette??????? ????? ?????????? ?????? ?? ????? demonstrate ???? ?? ??? GIF ???????? ??? ???? ???? ????????? ??? ???? ??? ??? ?? ????? ??? ?? ??? ?? ?????????? ????????? ??? ?? ??? ??? ????? ??? ???? ???????? ?????????? ?? ??? ??, ?????, ?????????? ??? ?? arbitrary ???? ?? ?? ?? ???? ?? ?? ???? ??? ????? ?? ?????? ????????? ?????????.GIF ??????? ??? ????? ??? ?? ????? ???? ??ColorPalette?? ???????? ??? ?? ??? ??? ????? ?? ?? ????? ??? ??? ???? ???? ?? ?? ???????? ??? ???? ?? ??? ????????? ???? ???? ?? ???ColorPalette. ?? ???? 256 ??? ??????? ??? ?? ???? ?? on the condition ?? ??? preceeding ???????????? ????? ????? ????? ?? ???-????? ??? ?? ??? ?? ???? ???? ????? ??? ??? ?? ????? ?? ??? ???? ?? ??? ???????????? ?? ????? ???? ???? ??? ???-????? ????? ????? ?? ??? ??? ???????????? opaque ???? ???? ???? ?????? ?????????? GIF/LZWMicrosoft ?? Unisys. GIF ????? ?????? ?? Unisys-????????? ???? ??????? ????? ?? Microsoft ???????? ?? ?????? ??? ????? ???????? ???? ???? LZW ??????? ?? ????? ???? ?? ??? ??? ??????? ??????? ??? ???????, ?? ??????? ??????????? ?? ?????? ???? ?? ??? Microsoft ????? ???????? ?? toolkits ?? ????? ???? ???? ?????-???? ???????? ?? ??????? ????? ?????-???? ??? ?????? ?? ??? ??? ?? ????????? ???? ?? ?? ?????? ??????? ?? ???????. gif ?????? ?? LZW ??????? ?? ????? ???? ?? ??? Unisys ???? ?? ???????? ???LZW ??????? ?? GIF ?? ???? ??? ???????? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????: 193543
(http://support.microsoft.com/kb/193543/EN-US/
)
?????: Unisys GIF ?? LZW ???????????? ??????? ??????? ????? ???????? ??? ?? ???? ???Microsoft ???????????? ?????? ?? ?????? ????? ??, ???? illustration ?????? ?? ?? expressed ?? ???????, ????? ???? ?? ???, ??????? ?????? ?? ?????? ??/?? ???? ????? ???????? ?? ??? ????????? ????? ???? ????? ????? ?? ???? ????? ?? ?? ?? demonstrated ?? ??? ???????????? ???? ?? ????? ?? ???????????? ?? ???? ???? ?? ??? ????? ??? ??????? ?? ?????? ???? Microsoft ?????? ????????? ?? ????? ????????? ?? ???????????? ?? ?????? ??? ?????? ?? ???? ???, ????? ?? ?? ???????? ?? ???????? ??????????????? ?? ???? ??????? ?????????? ?? ??? ???????????? ???? ?? ??? ??????? ???? ?????????? ?? ???????????? ????? ????? ??, ?? ?? ???? ?? ?? Microsoft ?????????? ??????? ?? Microsoft ??????? ???? ?? ?????? ????? ???? ??????? ?? ???, ????? Microsoft ??? ???? ?? ????: Microsoft ??????? - ?????????? ????https://partner.Microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104) Microsoft ??????? ????-HTTP://support.Microsoft.com/GP/advisoryservice (http://support.microsoft.com/gp/advisoryservice) ???? ??????? ?? ??? ?????? ??? ?? ?????? ???????? ?? ???? ??? ?? Microsoft ?? ?????? ???? ???? ?? ???? ???, ????? Microsoft ??? ???? ?? ????:HTTP://support.Microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS) ?????? ???????? ?? ???? ?????? ????? ?? ???????? ???? ?? ??? ?? ??? ?? ?????, ?? ???? ??? ???? ????? ?? ???? ?? ??? ??? ?????? ?? seems ??? ???? ??? ?? ??????? 1.0 ?? ?? ????? ?? ?? ???? GDIPlus ??? ?? ?? ???? ???? ??? ??? ???? ???? ?? ???? ??? ???? ??????? ?? ??? ?????"??????"????????? ??? ????? ?????? ?? ???? ???????????. ??? ?? ?? ??????? ??????? ????????? ?????? ?????? ?? ??? ????? ?????? ?? ?? ???? ?? ?? ??? ?? ??? ???? ???? ?? ????? ???? ?????????? ???????? ???? ?? ????????? ??????? ?? ?? ?? ??? ?????? ?? ?? ??? ??? ???? ????? ???? ?? ????????????? /??????? ??????? ??? ??? ?? ?? ??? ?? ????, ??????? impliciations ??? Particular ???, ??? ???????? ??? ????????? ?? ??? ?????? ???? ??? ???? ?? ?? ??? ?? ????????? ???? ??, ?? ????? ?? ??? ???? ?? ???? ??? ??????GIF ????? ??????? ?????? ?? ???? ??? ???????? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????: 318343
(http://support.microsoft.com/kb/318343/EN-US/
)
?????: GDI + GIF ????? ??? 8-BPP ?????? ????? ????? ??? ??? ???? ???? ?? ???? ??? ???????? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:312119
(http://support.microsoft.com/kb/312119/EN-US/
)
PRB: ?????? ???? ?? ?????? ???? ???? ?? ???? ???? ?? ????? Microsoft Visual C++ ?? ????? ???? ?? ???? ??? ???????? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????: 315780
(http://support.microsoft.com/kb/315780/EN-US/
)
HOWTO: ?????? ??? GIF ?? ??? ??? ?????? ?? ??? ????? GDI + ?????? ????????BPP ??????? - ????? ?? ?????? ?? ????? ????? digitized ???? ??? ??? ???????? ??????? ?? ??? ??? ?? ???????????? ???? ?? ??? ????? ???? ???? ??; ???????? ??????? ??? ??????? ??? ??? ??? ?? ????? ????? ?? ????? ???? ??? ??????? ?? generically ???????? ??????? ?????? BPP ?? 32, 24 BPP, 16 BPP, 8 BPP, 4 BPP, 1 BPP ????? ??? 8 BPP??? ??????? ?????? ?? ??? ??? ?? ???? ??? ????? ?? ????? expressed ??? ???? ??? ?????? ???????? ???-???-???? ??? (RGB) ??? ????????? ??? ?????? ??? ??? ??????????? ?? ??? ??? ????? ???? ??? ??????????? ?? ???? ??? ?? ???? ??, ??????? ??? ?????? ???? ?? ??? 256 ????? ??? ????? ??? GIF????????? ???????? ??????? - CompuServe ?????? ????? ??? ?? ?? streamable ??? ????? ??????? RGB???, ??? ?? ???? - ?? ????, ?? ???????????? ??? ??? ??? 3-???? triplet ?? ??? ??? ????????? each expressed. ???? ???? ???? ??:
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??. ?????????? ?? ??????? ????????? ??????? ??:319061
(http://support.microsoft.com/kb/319061/en-us/
)
| ???? ?????? ???? ?????? ??????
????????? ?????? ??????? ???????? ??????
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

????? ?? ???? ????
