Referred many thumbnail generation algorithms, but many were about to crop most of the available screen area, if the image to be thumbnail'ed is not aligned with the image's aspect ratio.
Algorithm that I figured out to save more area of the original image is:
Assume the thumbnail dimension should be x':y'.
1. Load the image and get original width(w) and hieght(h).
2. Scale the image to X:Y, such that:
a. if h > w, Y = h * aspect_ratio, X=w
b. if h < w, X = w * aspect_ratio, Y=h
3. Crop the scaled image to x':y' calculating the area from center of the picture.
GdkPixbuf functions used for implementing this algorithms are:
gdk_pixbuf_new_from_file(),
gdk_pixbuf_get_width(),
gdk_pixbuf_get_height(),
gdk_pixbuf_scale_simple(),
gdk_pixbuf_new(),
gdk_pixbuf_copy_area()
Social Marketing Startup BlogFrog Raises $3.2M
-
[image: blogfrog logo]BlogFrog, a self-described "social activation
platform," has raised $1.2 million in a Series A round of funding. The
company was firs...
1 hour ago



3 comments:
酒店
酒店上班
酒店兼職
台北酒店
打工兼差
酒店工作
酒店經紀
禮服店
酒店兼差
酒店打工
酒店PT
酒店正職
酒店賺錢
酒店日領
酒店喝酒 酒店消費 喝花酒 粉味 喝酒
read-iwwh.blogspot.com
NEVERTHELESS, THE CIVIL LAW is and must be neutral about who has a more noble or rewarding faith. The breakaway parishes ought to win every Office 2010facet of the lawsuit not becauseMicrosoft Office 2010 their beliefs or their politics are better, Microsoft wordbut because both lawOffice 2007and equity, along with common sense, are on Microsoft Officetheir side.Microsoft Office 2007 Not only does Virginia state law (the Division Statute)Office 2007 keyexplicitly apply to just such a Office 2007 downloadsituation as now exists, but the history Office 2007 Professionalespecially of The Falls Church argues against the claims of Outlook 2010the Virginia Diocese with which theyMicrosoft outlookhave disassociated.Microsoft outlook 2010First, The Falls Church wasWindows 7 founded, formed, and developed long before the diocese, or the national Episcopal Church, even existed.
Post a Comment