| private void Page_Load(object sender, System.EventArgs e) |
| { |
| // Create instance of PhotoSprite |
| Graphic MyGraphic = new PhotoSprite.Graphic(); |
| |
| // Original image name |
| MyGraphic.SourceFile = Server.MapPath( "/images/demo.jpg" ); |
| // Destination image name, and can make the same as the original image name |
| MyGraphic.DestFile = Server.MapPath( "/images/tmp/thumbnail.jpg" ); |
| |
| // Destination image width |
| MyGraphic.Width = 200; |
| |
| // Destination image height |
| MyGraphic.Height = 200; |
| |
| // Making thumbnail image |
| // This method will auto-fit the destination width and height |
| MyGraphic.Thumbnail(); |
| |
| |
| // Show the contrastive effect |
| SrcImage.Src = "/images/demo.jpg"; |
| DstImage.Src = "/images/tmp/thumbnail.jpg"; |
| } |
|