@@ 360,8 360,10 @@ module MRO
# $stderr.write "-(#{img['MediaType']})"
# next
# end
- src = nil
- Dir.glob(File.join(@IPHOTO.libraryPath,'resources','modelresources','*','*',row[11],row[12])) {|fn| src = fn} unless row[11].nil?
+ # $stderr.puts "img: #{row[5]}"
+ src = nil
+ # use the largest adjusted image binary (if there is an adjustmend)
+ src = Dir.glob(File.join(@IPHOTO.libraryPath,'resources','modelresources','*','*',row[11],row[12])).max_by {|fn| File.size(fn)} unless row[11].nil?
src ||= File.join(@IPHOTO.libraryPath, 'Masters', row[5]) # fallback to unmodified master image
raise src unless src.start_with?( @IPHOTO.libraryPath )
dst_fmt = case File.extname(src)