본문 바로가기
ETC/LeadTools Lecture

썸네일 생성 (stamp)

by 현이빈이 2008. 9. 8.
반응형
I sincerely apologize for the delay in getting back to you, but this code will load images identical to the thumbnail browser:

CodecsImageInfo info = this.codecs.GetInformation("c:\\280.tif", false, 1);
int width = info.Width;
int height = info.Height;

//this will be the base for calculating the size of the loaded image
Rectangle imageRect = new Rectangle(0, 0, 100, 100);

//transforms the above rectangle to one with the same aspect ratio of the image
imageRect = RasterImageList.GetFixedAspectRatioImageRectangle(width, height, imageRect);

//Bicubic is the slowest resize method, resample will work as well
rasterImageViewer1.Image = codecs.Load("c:\\280.tif", imageRect.Width, imageRect.Height, 24, RasterSizeFlags.Bicubic, info.Order, 1, 1);

I hope this helps you and once again I apologize for the delay.
반응형