Code Monkey home page Code Monkey logo

twilsonco / pyphotocollage Goto Github PK

View Code? Open in Web Editor NEW
24.0 4.0 6.0 53.66 MB

CLI, Pythonista (iOS App), and Siri Shortcut to combine 3 or more images into a collage, maintaining image aspect ratios and distributing images evenly over collage rows.

Home Page: https://routinehub.co/shortcut/17870/

License: MIT License

Python 100.00%
python python-3 pythonista-ios pythonista pythonista3 pythonista-scripts collage collage-maker pillow pil

pyphotocollage's Issues

Multi-row images

Just thinking out loud.

One method could be:

  1. given a photo p that will be on m rows
  2. pass multiple pointers to p's width (p.width * m) to the linear_partition function
  3. if the pointers end up on separate rows then as long as they're far-left or far-right in the row, the rest of the row will fit in perfectly

This is nice, but restricts p to the left or right columns.

If you instead

decided where p goes ahead of time, you could populate the remaining portion of the affected rows using more calls to linear_partition.
But this means that you need to know something about the resulting width of the collage, which currently is undetermined (it's the minimum width of any of the rows output by linear_partition).

The collage aspect ratio is somewhat predictable (it's very close to the average aspect ratio of the images).
If I took the total width then I could used the average aspect ratio to approximate the resulting width of the collage, which then allows me to know the width of p when on multiple rows as well as the widths of the new subrows to the left and right of p.

That second one might work

Now I just need to do it.

Unable to get better resolution of images for PhotoCollage.py

First of, I really appreciate the work yo have done. It works great.
The only issue I have is with the resolution.
I have tried setting the image sizes in the arguments to very large values, but nothing seems to increase the resolution of the images in the collage. Delimitry's collage_maker produced a higher quality image.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.