6ae4f56ed7a7b99d529dbcae551b727737d81b4f,imagekit/models.py,ImageSpecFile,_create,#ImageSpecFile#,100

Before Change


            format = self.field.format
            if not format:
                // Get the real (not suggested) extension.
                extension = os.path.splitext(self.name)[1].lower()
                // Try to guess the format from the extension.
                format = Image.EXTENSION.get(extension)
            format = format or img.format or "JPEG"

After Change


            fp.seek(0)
            fp = StringIO(fp.read())

            img, content = self._process_content(self.name, fp)
            self._file = self.storage.save(self.name, content)
        else:
            // TODO: Should we error here or something if the imagefield doesn"t exist?
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: matthewwithanm/django-imagekit
Commit Name: 6ae4f56ed7a7b99d529dbcae551b727737d81b4f
Time: 2011-09-23
Author: matthew@exanimo.com
File Name: imagekit/models.py
Class Name: ImageSpecFile
Method Name: _create


Project Name: deeppomf/DeepCreamPy
Commit Name: 7c0c307a2a8fbdb9b0eb82c275ca8c977aae90f3
Time: 2018-10-30
Author: harjit@harjit.moe
File Name: decensor.py
Class Name: Decensor
Method Name: decensor_all_images_in_folder


Project Name: craffel/mir_eval
Commit Name: 7d805ab9d26c74db2319658f1ee1d0235f092845
Time: 2014-07-25
Author: craffel@gmail.com
File Name: mir_eval/input_output.py
Class Name:
Method Name: load_time_series