Git Product home page Git Product logo

Comments (8)

aaronrudkin avatar aaronrudkin commented on August 13, 2024

Ah, yeah, this probably will probably impact any landscape member photo. Probably easier to crop the photos than fix the display.

from webvoteview.

aaronrudkin avatar aaronrudkin commented on August 13, 2024

Okay, I whipped up a shell script to quarantine the landscape photos. We lose 299-302 photos to this but I am confident the remaining photos should display fairly well. I am going to experiment with automatic smart cropping on the landscape and see how badly that mangles things.

from webvoteview.

aaronrudkin avatar aaronrudkin commented on August 13, 2024

I did a shell script to center-crop to 4:5 aspect ratio all of our landscape images. The effect generally looks good. I have deployed the cropped files to fix it. Side note: if the old images do not update, it's a caching thing.

There were 19 files that did not crop well.

http://128.97.229.160/static/manual.zip
Can someone who is not me download this zip file, manually crop the images inside to a 4:5 aspect ratio (100 width for every 125 height) as appropriate and then reupload them to vvd's /static/img/bios/ folder (you can use sftp) and do a commit? Then close this issue

from webvoteview.

JeffreyBLewis avatar JeffreyBLewis commented on August 13, 2024

I cropped the 15 photos referenced above and uploaded and committed. There is one remaining real problem which is that 009662.jpg does not appear to contain an image of a person at all! Also, while not strictly speaking a problem, I think 015427.jpg is Joe Kennedy. I am sure we could find a better image of him that the one that I just cropped.

from webvoteview.

JeffreyBLewis avatar JeffreyBLewis commented on August 13, 2024

I updated to a better picture of J. P. Kennedy. 009662 (Daniel Verplanck of NY) has as is picture a picture of his house. It from wikipedia, I did a little searching for a better image of him, without success. I am going to call this closed and we can ad 009662 to the short list of folks for whom we do not have images.

from webvoteview.

aaronrudkin avatar aaronrudkin commented on August 13, 2024

Thanks Jeff! If you notice any other photos that seem bad, feel free to keep adding to the manual folder as necessary!

from webvoteview.

adamboche avatar adamboche commented on August 13, 2024

Still present for some

from webvoteview.

aaronrudkin avatar aaronrudkin commented on August 13, 2024

I have a maintenance script in /usr/scripts/voteview_metadata/updateDB/imageAspectRatio/ called smartcrop-batch. Our ideal aspect ratio is 5:4 (1.25). The script scans for anything about 1.35 (too long) or below 1.15 (too wide) and uses facial recognition to crop to 5:4 as best as it can. So the absolute most that a remaining image will be squished or stretched is 8%.

Feel free to alter the parameters here if you want the tolerance to be a little lower, but we cause quality degradation by re-encoding a JPG so unless you think the aspect ratio is real bad I wouldn't.

from webvoteview.

Related Issues (20)

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.