Comments (8)
Ah, yeah, this probably will probably impact any landscape member photo. Probably easier to crop the photos than fix the display.
from webvoteview.
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.
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.
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.
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.
Thanks Jeff! If you notice any other photos that seem bad, feel free to keep adding to the manual folder as necessary!
from webvoteview.
Still present for some
from webvoteview.
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)
- Fix party page for party 328 (independent) -- JS error [python3 only]
- Add congress codes to metadata
- Brush to select on Congress DW-NOMINATE plot shows NaN when selecting far-right
- Wikipedia key vote not an option on search facets
- Check or update service dates HOT 1
- Rewrite JS in modern-ish (ES6 or newer) Javascript
- Better link previews for rollcall votes
- Party bios should support HTML
- Trump vote on Gorsuch may be wrong
- Map download colors missing HOT 1
- Bulk vote download problem
- More friendly 500 error page
- Downloading zoomed map HOT 1
- Data downloads all 404 HOT 4
- Show member departures
- Add issue codes to csv files
- Scalia confirmation vote
- Load 97th Congress bill numbers
- Two bugs regarding member with DW-NOMINATE score of 0
- Wrong image for 19th-century congressman HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webvoteview.