Code Duplication    Length = 6-7 lines in 2 locations

fpdf/makepdf_class.php 2 locations

@@ 294-300 (lines=7) @@
291
      $nh=$ih;
292
      //resizing in x-direction
293
      $xsflag=0;
294
      if($iw>150)    {
295
        $xscale=150 / $iw;
296
        $yscale=$xscale;
297
        $nw=$xscale * $iw;
298
        $nh=$xscale * $ih;
299
        $xsflag=1;
300
      }
301
      //now eventually resizing in y-direction
302
      $ysflag=0;
303
      if(($oposy+$nh)>250){
@@ 303-308 (lines=6) @@
300
      }
301
      //now eventually resizing in y-direction
302
      $ysflag=0;
303
      if(($oposy+$nh)>250){
304
        $yscale=(250-$oposy)/$ih;
305
        $nw=$yscale * $iw;
306
        $nh=$yscale * $ih;
307
        $ysflag=1;
308
      }
309
      //uups, if the scaling factor of resized image is < 0.33
310
      //remark: without(!) the global factor $scale!
311
      //that's hard -> on the next page please...