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

How to contributes bikes #9

Closed
louis-ev opened this issue May 13, 2024 · 3 comments
Closed

How to contributes bikes #9

louis-ev opened this issue May 13, 2024 · 3 comments

Comments

@louis-ev
Copy link
Owner

This issue explains how to contribute a bike to the tool.

  1. find a high resolution photo (bigger than 1000px in both dimensions, ideally) of the bike on a white background

  2. use an online tool to remove that background (such as https://new.express.adobe.com/ ) and download a transparent PNG of the image

  3. in the image, measure horizontally the bike relative to the image width (let's say a bike makes up only 75% of the image width)

  4. measure the margin between the left edge of the image and the left edge of the bike (usually the wheel, sometimes the monkey bars if welded on the bike and if the manufacturer uses the bars when giving the length of the bike), and the bottom edge of the image and the bottom of the wheels.

  5. post here the image and informations, or, if you know your way around git/github, append all this in as a new object in the src/assets/bike_images.json file and send a pull request :

  {
    "id": "chike",
    "id_in_csv": "Chike/Cargo",
    "manufacturer": "Chike",
    "model": "Cargo",
    "src": "CHIKE_e-Kids_2022_taubenblau-scaled-transformed.png",
    "bike_length_percent": 0.86577181,
    "bike_length_cm": 192,
    "left_margin_percent": 0.075,
    "bottom_margin_percent": 0.088,
    "url": "https://chike.de/en/"
  },

Feel free to post here for any questions/help.

@Anthony-Bible
Copy link

Anthony-Bible commented May 31, 2024

How are you getting the percentages? Like for example step 3?

Edit: I was able to import the image with the background removed into gimp. I then used the measure tool (shift + m) to get the pixel count and then divided that by the size of the image. For anyone looking at this in the future it might help to do vertical and horizontal guides.

You should be able to do the above in photoshop too.

@louis-ev
Copy link
Owner Author

Thanks for the feedbacks! Indeed, not very convenient.
I am actually working on a small menu to simplify adding a bike: enter the URL to the image (hosted somewhere online, set the right percent value with a slider, then click on this link to send me these values via email so I can double check and add those to the code). See the branch develop-add_bike_local (though a lot of work still needs to be done).

@louis-ev
Copy link
Owner Author

louis-ev commented Jun 6, 2024

The above feature is in place.

@louis-ev louis-ev closed this as completed Jul 5, 2024
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

No branches or pull requests

2 participants