if (letterbox_p)
{
min_w = img_w;
min_h = img_h;
}
else
{
min_w=img_w;
min_h=img_h;
if (min_w < vp_w)
{
min_w = vp_w;
min_h = img_h * (float) vp_w / img_w;
fprintf(stderr,"[width %i]",img_w);
}
if (min_h < vp_h)
{
min_w = img_w * (float) vp_h / img_h;
min_h = vp_h;
fprintf(stderr,"[height %i]", img_h);
}
fprintf(stderr,"minimum size is %ix%i - vs %ix%i\n",min_w,min_h,
vp_w,vp_h);
}
(les printf sont purement optionnels, bien sûr :P)
Aucun commentaire:
Enregistrer un commentaire