0
나는 데이터베이스에 몇 개의 이미지 URL을 가지고 있으며 다운로드하지 않고 내 로컬의 이미지와 비교하려고합니다.서면없이 웹의 로컬 이미지를 이미지와 비교하는 방법은 무엇입니까?
은 내가 this example 및 this question 를 읽고 난 같은 이미지에 대해이 코드를 테스트이
adr = "url_of_image"
file = cStringIO.StringIO(urllib.urlopen(adr).read())
img = Image.open(file)
img = str(img)
print type(img)
image_file = open('adresse_of_image_in_local').read()
print type(image_file)
if (img == image_file):
print "the pictures of the same"
else :
print "they are not the same"
을 시도,하지만 난이
<type 'str'>
<type 'str'>
they are not the same
내 문제는 내가 이미지를 비교할 수있는 방법입니다 있어요 저축하지 않고 웹상의 이미지로 로컬에?