2 # Check that thumbnail aspect ratios match pre-migration data
9 my $gal = UCW::Gallery->load_config;
10 my $meta = $gal->read_meta($gal->cache_meta_name);
12 open T, "gallery.thumb" or die "Cannot read gallery.thumb\n";
16 my ($name, $tw, $th) = split /\s+/;
17 push @thumbs, [ $tw, $th ];
21 for my $id (@{$meta->{sequence}}) {
22 my ($tw, $th) = @{shift @thumbs} or die;
24 my $m = $meta->{photo}->{$id} or die;
28 if (abs($ta - $pa) > 0.05) {
29 if (abs($ta - 1/$pa) > 0.05) {
30 print STDERR "$id: Mismatched aspect ratio: orig $ta (${tw}x${th}) new $pa (${pw}x${ph})\n";
32 print STDERR "$id: Mismatched rotation\n";