Esempio n. 1
0
        public ImagePathInfo GetImage(Ctx ctx, int ad_image_id, int height, int width, string URI)
        {
            MImage mimg  = new MImage(ctx, ad_image_id, null);
            bool   url   = false;
            var    value = mimg.GetThumbnail(height, width, out url);

            if (url)
            {
                UsrImage = URI + "/Images/" + value;
                return(new ImagePathInfo()
                {
                    Path = value, IsUrl = true
                });
            }
            else
            {
                UsrImage = "data:image/jpg;base64," + value;
                return(new ImagePathInfo()
                {
                    Bytes = value, IsUrl = false
                });
            }
        }