1

Closed

preview thumbnails

description

if the item is jpg, png - crate a thumbanil
if the item is not an image file - then associate the icon (jpg, png, and so on)
Closed Feb 7, 2011 at 8:39 PM by ignatandrei

comments

wrote Feb 1, 2011 at 9:55 PM

 private byte[] GetImageFromExtension(string ext)        {//TODO : find image in list of ico's            if (ext == null)                ext = "";            ext = ext.Replace(".", "");            var objBitmap = new Bitmap(200, 200, PixelFormat.Format24bppRgb);            var objGraphic = Graphics.FromImage(objBitmap);            var whiteBrush = new SolidBrush(Color.White);             var redBrush = new SolidBrush(Color.Red);            objGraphic.FillRectangle(whiteBrush, 0, 0, 200, 200);            Font font = new Font("Arial", 20);             objGraphic.DrawString(ext, font, redBrush, 0, 0);                         using (MemoryStream ms = new MemoryStream())            {                objBitmap.Save(ms, ImageFormat.Jpeg);                return ms.ToArray();            }         }

wrote Feb 2, 2011 at 10:11 PM

Associated with changeset 67822.

wrote Feb 2, 2011 at 10:16 PM

Associated with changeset 67824.

wrote Feb 2, 2011 at 10:17 PM

Associated with changeset 67825.

wrote Feb 2, 2011 at 10:19 PM

Now :
  1. find some ico/jpeg for common files and put in BackupObjects solution
  2. modify the generated ico -  make smaller
  3. Nunit testing

wrote Feb 2, 2011 at 11:01 PM

Associated with changeset 67839.

wrote Feb 2, 2011 at 11:18 PM

Associated with changeset 67842.

wrote Feb 3, 2011 at 11:47 PM

Associated with changeset 67933.

wrote Feb 3, 2011 at 11:48 PM

Associated with changeset 67934.

wrote Feb 3, 2011 at 11:51 PM

almost finished -just add unit testing.

wrote Feb 7, 2011 at 8:39 PM

Resolved with changeset 68159.

wrote Feb 12, 2013 at 10:06 PM

wrote May 14, 2013 at 8:54 PM