summaryrefslogtreecommitdiffstats
path: root/gtk/src/preview.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-05-04 05:26:13 +0000
committerjstebbins <[email protected]>2009-05-04 05:26:13 +0000
commit11317ace31dcd579f353d26849b24d2250f45abf (patch)
tree62fc29c50cd35cd01d64f4f805ffc6507395059d /gtk/src/preview.c
parentb2661d006f5b972e8599903b4909a8633ea5d5b3 (diff)
LinGui: preview changes
- update hb_get_preview to allow upscaling and remove borders - allow upscaling in the gui - add user option to show visible cropping borders - gui generates borders when needed instead of hb_get_preview, which allows for flexible alternatives like alternate colors git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2376 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/preview.c')
-rw-r--r--gtk/src/preview.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index ef5f8c738..5ec067b62 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -122,7 +122,10 @@ ghb_par_scale(signal_user_data_t *ud, gint *width, gint *height, gint par_n, gin
num = par_n * disp_par_d;
den = par_d * disp_par_n;
- *width = *width * num / den;
+ if (par_n > par_d)
+ *width = *width * num / den;
+ else
+ *height = *height * den / num;
}
void
@@ -667,7 +670,7 @@ ghb_set_preview_image(signal_user_data_t *ud)
ud->preview->pix =
ghb_get_preview_image(titleindex, ud->preview->frame,
- ud, TRUE, &width, &height);
+ ud, &width, &height);
if (ud->preview->pix == NULL) return;
preview_width = gdk_pixbuf_get_width(ud->preview->pix);
preview_height = gdk_pixbuf_get_height(ud->preview->pix);