]> granicus.if.org Git - handbrake/commitdiff
LinGui: preview crop border fix
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 4 May 2009 21:01:42 +0000 (21:01 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 4 May 2009 21:01:42 +0000 (21:01 +0000)
fix slight virtical stretching when borders applied and mod is 16

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2381 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/hb-backend.c

index f2f0f2a7f1ccdde58c4de42a729912d4639f37aa..46e3e9d3f24e4b6151479c70a9e79c6520470ff1 100644 (file)
@@ -2917,6 +2917,7 @@ set_preview_job_settings(hb_job_t *job, GValue *settings)
                job->crop[3] = 0;
                job->width = job->title->width;
                job->height = job->title->height;
+               job->anamorphic.modulus = 2;
        }
 
        gint deint = ghb_settings_combo_int(settings, "PictureDeinterlace");
@@ -4088,6 +4089,7 @@ ghb_get_preview_image(
        c2 = ghb_settings_get_int(settings, "PictureLeftCrop");
        c3 = ghb_settings_get_int(settings, "PictureRightCrop");
 
+printf("dims %dx%d\n", w, h);
        gdouble xscale = (gdouble)w / (gdouble)(title->width - c2 - c3);
        gdouble yscale = (gdouble)h / (gdouble)(title->height - c0 - c1);
        
@@ -4126,7 +4128,7 @@ ghb_get_preview_image(
                w *= (gdouble)dstWidth / orig_w;
                h *= (gdouble)dstHeight / orig_h;
        }
-       g_debug("scaled %d x %d", dstWidth, dstHeight);
+       g_message("scaled %d x %d", dstWidth, dstHeight);
        GdkPixbuf *scaled_preview;
        scaled_preview = gdk_pixbuf_scale_simple(preview, dstWidth, dstHeight, GDK_INTERP_HYPER);
        if (ghb_settings_get_boolean(settings, "show_crop"))