Пример #1
0
        public ActionResult Large(Guid id)
        {
            var image = imagesLogic.GetImage(id);
            var largeImagePngRawData = ImagesLogic.RepeatImage(image.RawData, 537, 340);

            return(new FileContentResult(largeImagePngRawData, "image/png"));
        }
Пример #2
0
        public ActionResult Vector(Guid id, String filter)
        {
            var currentUserId      = CurrentUser != null ? CurrentUser.Id : new Guid();
            var apiPattern         = patternsLogic.GetWithState(id, currentUserId);
            var svg                = ImagesLogic.GetVector(apiPattern, filter);
            var contentDisposition = new System.Net.Mime.ContentDisposition
            {
                FileName = id + ".svg",
                Inline   = false,
            };

            Response.AppendHeader("Content-Disposition", contentDisposition.ToString());
            return(new FileStreamResult(svg, "image/svg+xml"));
        }