Skip to content

Commit

Permalink
Use WEBP instead of JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
SudKul committed Mar 23, 2021
1 parent 2259eba commit e892971
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Binary file added data/nyc.webp
Binary file not shown.
Binary file added data/paris.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/TrafficSimulator-Final.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
void createTrafficObjects_Paris(std::vector<std::shared_ptr<Street>> &streets, std::vector<std::shared_ptr<Intersection>> &intersections, std::vector<std::shared_ptr<Vehicle>> &vehicles, std::string &filename, int nVehicles)
{
// assign filename of corresponding city map
// Note: You can use the webp format instead of jpeg
// According to Google - WebP lossless images are 26% smaller in size compared to PNGs.
// WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index.
filename = "../data/paris.jpg";

// init traffic objects
Expand Down Expand Up @@ -54,6 +57,7 @@ void createTrafficObjects_Paris(std::vector<std::shared_ptr<Street>> &streets, s
void createTrafficObjects_NYC(std::vector<std::shared_ptr<Street>> &streets, std::vector<std::shared_ptr<Intersection>> &intersections, std::vector<std::shared_ptr<Vehicle>> &vehicles, std::string &filename, int nVehicles)
{
// assign filename of corresponding city map
// Note: You can use the webp format instead of jpeg
filename = "../data/nyc.jpg";

// init traffic objects
Expand Down

0 comments on commit e892971

Please sign in to comment.