示例#1
0
        public static void SetAva(Server.TokenAndId tai, LightImage image, BrainDuelsLib.delegates.Action callback)
        {
            LightImage largeImage = image.CropToSize(SocketManager.Images.avatarSize.width, SocketManager.Images.avatarSize.height);
            LightImage miniImage  = image.CropToSize(SocketManager.Images.miniAvatarSize.width, SocketManager.Images.miniAvatarSize.height);
            string     content1   = ImageSerizlizer.Serialize(largeImage);
            string     content2   = ImageSerizlizer.Serialize(miniImage);

            PictureRequest.SetPicture(tai, content1, callback, true);
            PictureRequest.SetPicture(tai, content2, callback, false);
        }
示例#2
0
        public IImage LightAvaToImage(LightImage li, int width, int height)
        {
            li = li.CropToSize(width, height);
            IImage avaImage = SocketManager.resourcesProvider.MakeIImage(li);

            return(avaImage);
        }