Skip to content

Add PIL fallback for image resizing#232

Open
vikhyat wants to merge 4 commits intomainfrom
add-pil-fallback
Open

Add PIL fallback for image resizing#232
vikhyat wants to merge 4 commits intomainfrom
add-pil-fallback

Conversation

@vikhyat
Copy link
Owner

@vikhyat vikhyat commented Jan 26, 2025

This PR adds a fallback to PIL/Pillow for image resizing when PyVips is not available. Changes include:

  • Modified image_crops.py to use PIL when PyVips import fails
  • Added comprehensive tests to verify both PyVips and PIL implementations produce similar results
  • Test results show max pixel difference of 2.0 and mean difference of 0.27 between implementations

This change makes the library more accessible to users who may not have PyVips installed.

@vikhyat vikhyat marked this pull request as ready for review January 28, 2025 07:27
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.

2 participants