improve image hashing

This commit is contained in:
Ross
2023-12-26 17:11:02 +00:00
parent 8c0aaa82e2
commit 714f472da6
14 changed files with 183 additions and 42 deletions
+1 -1
View File
@@ -581,7 +581,7 @@ class RapidImage(models.Model):
def save(self, *args, **kwargs):
"""Override save method to add image hash"""
if self.image:
image_hash, is_dicom = get_image_hash(self.image)
image_hash, is_dicom = get_image_hash(self.image, hash_type="md5", direct_pixel_data=False)
self.is_dicom = is_dicom
self.image_md5_hash = image_hash