Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve file operations, update docstrings #20

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

ajinkya-kulkarni
Copy link
Contributor

  • Changed the import statement for the Image class from PIL to PIL.Image.
  • Updated the image_comparison function to include a docstring.
  • Now creates a temporary file path using the os.path.join() function
  • Updated the height calculation to convert the result to an integer using the int function.
  • Added a in_memory flag to the image_comparison function to handle pillow to base64 conversion in memory without saving to local.
  • Simplified the conditional statement in the image_comparison function for checking whether to convert images to base64 strings in memory or from temporary files.
  • Updated the pillow_local_file_to_base64 function to accept a directory path as a parameter, so that it can save the temporary file in the specified directory.

@ajinkya-kulkarni
Copy link
Contributor Author

I checked the code on my end - works fine

@fcakyon fcakyon changed the title Bumped up version with major changes improve file operations, update docstrings Mar 14, 2023
@fcakyon fcakyon merged commit 235d422 into fcakyon:main Mar 14, 2023
@fcakyon
Copy link
Owner

fcakyon commented Mar 14, 2023

@ajinkya-kulkarni thank you so much for this awesome contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants