Esempio n. 1
0
 @Test
 public void Copy_thumb() {
   fxt.Init_orig_db(Xof_orig_arg.new_comm("A.png", 440, 400));
   fxt.Init_fsdb_db(Xof_fsdb_arg.new_comm_thumb("A.png"));
   fxt.Exec_get(Xof_exec_arg.new_thumb("A.png").Rslt_orig_exists_y().Rslt_file_exists_y());
   fxt.Test_fsys("mem/root/common/thumb/7/0/A.png/220px.png", "220,200");
 }
Esempio n. 2
0
 @Test
 public void Height_only() { // PURPOSE.fix: height only was still using old infer-size code;
   // EX:w:[[File:Upper and Middle Manhattan.jpg|x120px]]; DATE:2012-12-27
   fxt.Init_orig_db(Xof_orig_arg.new_comm("A.png", 12591, 1847));
   fxt.Init_fsdb_db(Xof_fsdb_arg.new_comm_thumb("A.png", 887, 130));
   fxt.Exec_get(Xof_exec_arg.new_thumb("A.png", Xop_lnki_tkn.Width_null, 130));
   fxt.Test_fsys("mem/root/common/thumb/7/0/A.png/887px.png", "887,130");
 }
Esempio n. 3
0
 @Test
 public void Make_thumb() {
   fxt.Init__orig_w_fsdb__commons_orig("A.png", 440, 400);
   fxt.Exec_get(
       Xof_exec_arg.new_thumb("A.png")
           .Rslt_orig_exists_y()
           .Rslt_file_exists_y()
           .Rslt_file_resized_y());
   fxt.Test_fsys("mem/root/common/thumb/7/0/A.png/220px.png", "220,200");
 }
Esempio n. 4
0
 @Test
 public void Upright() { // PURPOSE.fix: upright not working;  EX: w:Beethoven;
   // [[File:Rudolf-habsburg-olmuetz.jpg|thumb|upright|]]
   fxt.Init_orig_db(Xof_orig_arg.new_comm("A.png", 1378, 1829));
   fxt.Init_fsdb_db(Xof_fsdb_arg.new_comm_thumb("A.png", 170, 226));
   fxt.Exec_get(
       Xof_exec_arg.new_thumb("A.png", Xop_lnki_tkn.Width_null, Xop_lnki_tkn.Height_null)
           .Lnki_upright_(Xof_img_size.Upright_default_marker));
   fxt.Test_fsys("mem/root/common/thumb/7/0/A.png/170px.png", "170,226");
 }
Esempio n. 5
0
 @Test
 public void
     Width_only_height_ignored() { // PURPOSE.fix: if height is not specified, do not recalc;
   // needed when true scaled height is 150x151 but WM has 150x158;
   // defect would discard 150x158;
   // EX:[[File:Tokage_2011-07-15.jpg|150px]]
   // simple.wikipedia.org/wiki/2011_Pacific_typhoon_season;
   // DATE:2013-06-03
   fxt.Init_orig_db(Xof_orig_arg.new_comm("A.png", 4884, 4932));
   fxt.Init_fsdb_db(Xof_fsdb_arg.new_comm_thumb("A.png", 150, 150));
   fxt.Exec_get(Xof_exec_arg.new_thumb("A.png", 150, Xop_lnki_tkn.Height_null));
   fxt.Test_fsys("mem/root/common/thumb/7/0/A.png/150px.png", "150,150");
 }