예제 #1
0
        public static FileInfo OfPath(string e)
        {
            FileInfo n = new FileInfo();

            n.FullPath = e;

            return n;
        }
예제 #2
0
        public static Image Of(FileInfo f)
        {
            Image n = new Image();

            n.ImageFile = f;

            n.Open();

            return n;
        }
예제 #3
0
        public void SaveThumbnailAs(FileInfo fileInfo, int width)
        {
            int height = width * 3 / 4;


            object t1 = Native.API.imagecreatetruecolor(width, height);


            if (Height > Width)
            {
                int osh = Width * 3 / 4;

                Native.API.imagecopyresampled(t1, Handle, 0, 0, 0, osh / 2, width, height, Width, osh);

            }
            else
            {
                int osw = Height * 4 / 3;


                Native.API.imagecopyresampled(t1, Handle, 0, 0, 0, 0, width, height, osw, Height);
            }

            Native.API.imagejpeg(t1, fileInfo.FullPath, 100);

        }
예제 #4
0
 public static Properties Of(FileInfo e)
 {
     return new Properties(e.Text);
 }