Modify

Opened 8 months ago

Last modified 7 months ago

#21624 new enhancement

Optimise images on github Windows builds

Reported by: Stereo Owned by: team
Priority: normal Milestone:
Component: Installer Windows Version: tested
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. Download a tested windows build from https://github.com/JOSM/josm/releases/tag/18303-tested
  2. Extract the images from wherever it stores the jar
  3. Look at image sizes

What is the expected result?

Images are already optimised

What happens instead?

The image optimisation only gets run on the macOS runner because it uses the imageoptim macOS app.

Images should be optimised in the svn tree. This would provide optimised images for every build, let us try a variety of slow and efficient PNG tools that aren't in imageoptim like pngwolf-zopfli, and speed up build times.

Attachments (0)

Change History (4)

comment:1 Changed 8 months ago by taylor.smock

For the record, here are current png files in a jar:

find . -name '*png'
./images/logo_48x48x32.png
./images/logo_16x16x32.png
./images/logo_16x16x8.png
./images/logo_32x32x32.png
./images/icons/transport_airport_gate.n.16.png
./images/icons/tourist_theatre.n.16.png
./images/icons/food_drinkingtap.n.16.png
./images/icons/accommodation_chalet.n.16.png
./images/icons/transport_helicopter_pad.n.16.png
./images/icons/shopping_hairdresser.n.16.png
./images/icons/tourist_information.png
./images/icons/food_cafe.n.16.png
./images/icons/barrier_bollard.n.16.png
./images/icons/shopping_toys.n.16.png
./images/icons/shopping_jewelry.n.16.png
./images/icons/shopping_music.n.16.png
./images/icons/transport_parking_bicycle.n.16.png
./images/icons/shopping_diy.n.16.png
./images/icons/place.png
./images/icons/emergency-telephone-16.png
./images/icons/power_station.png
./images/icons/sport_leisure_centre.n.16.png
./images/icons/amenity_toilets.n.16.png
./images/icons/power_tower_low.n.16.png
./images/icons/emergency_hydrant.n.16.png
./images/icons/shopping_vending_machine.n.16.png
./images/icons/place_of_worship_unknown.n.16.png
./images/icons/accommodation_alpinehut.n.16.png
./images/icons/shopping_hifi.n.16.png
./images/icons/amenity_library.n.16.png
./images/icons/sport_shooting.n.16.png
./images/icons/food_restaurant.n.16.png
./images/icons/shopping_supermarket.n.16.png
./images/icons/shopping_laundrette.n.16.png
./images/icons/transport_car_wash.n.16.png
./images/icons/accommodation_motel.n.16.png
./images/icons/barrier_blocks.16.png
./images/icons/accommodation_caravan_park.n.16.png
./images/icons/transport_parking_car.n.16.png
./images/icons/food_pub.n.16.png
./images/icons/shopping_kiosk.n.16.png
./images/icons/food_bar.n.16.png
./images/icons/shopping_car_repair.n.16.png
./images/icons/amenity_firestation2.n.16.png
./images/icons/barrier_cycle_barrier.16.png
./images/icons/barrier_lift_gate.n.16.png
./images/icons/shopping_greengrocer.n.16.png
./images/icons/tourist_theme_park.n.16.png
./images/icons/amenity_post_office.n.16.png
./images/icons/tourist_picnic.n.16.png
./images/icons/tourist_memorial.n.16.png
./images/icons/money_atm.n.16.png
./images/icons/accommodation_shelter2.n.16.png
./images/icons/shopping_marketplace.n.16.png
./images/icons/tourist_castle.n.16.png
./images/icons/transport_aerodrome.n.16.png
./images/icons/barrier_gate.n.16.png
./images/icons/barrier_stile.n.16.png
./images/icons/accommodation_camping.n.16.png
./images/icons/shopping_motorcycle.n.16.png
./images/icons/shopping_bicycle.n.16.png
./images/icons/shopping_butcher.n.16.png
./images/icons/food_nightclub.n.16.png
./images/icons/cattle_grid.png
./images/icons/amenity_post_box.n.16.png
./images/icons/shopping_bakery.n.16.png
./images/icons/barrier_cattle_grid.16.png
./images/icons/amenity_waste_bin.n.16.png
./images/icons/amenity_fountain2.n.16.png
./images/icons/tourist_view_point.n.16.png
./images/icons/shopping_alcohol.n.16.png
./images/icons/tourist_zoo.n.16.png
./images/icons/health_pharmacy.n.16.png
./images/icons/transport_rental_bicycle.n.16.png
./images/icons/barrier_kissing_gate.16.png
./images/icons/natural_tree.n.16.png
./images/icons/money_bank2.n.16.png
./images/icons/shopping_car.n.16.png
./images/icons/education_nursery3.n.16.png
./images/icons/tourist_monument.n.16.png
./images/icons/shopping_clothes.n.16.png
./images/icons/shopping_book.n.16.png
./images/icons/education_school.n.16.png
./images/icons/amenity_bench.n.16.png
./images/icons/health_veterinary.n.8E7409.16.png
./images/icons/health_hospital.n.16.png
./images/icons/transport_weir.n.16.png
./images/icons/transport_zebracrossing.n.16.png
./images/icons/tourist_art_gallery2.n.16.png
./images/icons/shopping_garden_centre.n.16.png
./images/icons/accommodation_youth_hostel.n.16.png
./images/icons/manmade_lighthouse.png
./images/icons/transport_taxi_rank.n.16.png
./images/icons/transport_port.n.16.png
./images/icons/shopping_confectionery.n.16.png
./images/icons/shopping_department_store.n.16.png
./images/icons/transport_bus_station.n.16.png
./images/icons/transport_miniroundabout_anticlockwise.n.16.png
./images/icons/tourist_ruin.n.16.png
./images/icons/amenity_playground.n.16.png
./images/icons/transport_tram_stop.n.16.png
./images/icons/manmade_tower.png
./images/icons/shopping_florist.n.16.png
./images/icons/transport_bus_stop2.n.16.png
./images/icons/tourist_battlefield.n.16.png
./images/icons/amenity_police2.n.16.png
./images/icons/tourist_cinema.n.16.png
./images/icons/amenity_recycling.n.16.png
./images/icons/accommodation_bed_and_breakfast.n.16.png
./images/icons/power_substation.n.16.png
./images/icons/power_tower_high2.n.16.png
./images/icons/tourist_museum.n.16.png
./images/icons/shopping_fish.n.16.png
./images/icons/telephone.png
./images/icons/shopping_convenience.n.16.png
./images/icons/accommodation_hotel.n.16.png
./images/icons/sport_swimming_outdoor.n.16.png
./images/icons/barrier_toll_booth.n.16.png
./images/icons/transport_rental_car.n.16.png
./images/icons/transport_marina.n.16.png
./images/icons/transport_airport_terminal.n.16.png
./images/icons/natural_peak.n.16.png
./images/icons/food_fastfood.n.16.png
./images/icons/ISO_7010_E010.16.png
./images/icons/transport_fuel.n.16.png
./images/icons/amenity_town_hall.n.16.png
./images/icons/shopping_gift.n.16.png
./images/icons/tourist_archaeological.n.16.png
./images/icons/transport_train_station.n.16.png
./images/logo_48x48x8.png
./images/logo_32x32x8.png
./images/logo_macOS.png
./org/openstreetmap/gui/jmapviewer/images/plus.png
./org/openstreetmap/gui/jmapviewer/images/bing_maps.png
./org/openstreetmap/gui/jmapviewer/images/hourglass.png
./org/openstreetmap/gui/jmapviewer/images/minus.png
./org/openstreetmap/gui/jmapviewer/images/error.png
./com/drew/imaging/png
./com/drew/metadata/png

The one I spotchecked was used in source:trunk/resources/styles/standard/potlatch2.mapcss

Stupid question: Can we move the potlatch2 onto JOSM wiki? Or is there another reason to keep it around in tree (tests?)?
Advantage: A new release of JOSM isn't required to update the icons/style sheet
Cons: Not built in anymore

This would save ~500K unzipped and ~84K zipped.

comment:2 in reply to:  1 ; Changed 8 months ago by Klumbumbus

Replying to taylor.smock:

Can we move the potlatch2 onto JOSM wiki?

See #18866. Thats already available. The built in Potlatch2 mapcss style and its icons can be removed, but this requires also some code to remove the style from the users list of active styles. Else they will end up with an error afaik.

Last edited 8 months ago by Klumbumbus (previous) (diff)

comment:3 in reply to:  2 Changed 8 months ago by taylor.smock

Replying to Klumbumbus:

Replying to taylor.smock:

Can we move the potlatch2 onto JOSM wiki?

See #18866. Thats already available. The built in Potlatch2 mapcss style and its icons can be removed, but this requires also some code to remove the style from the users list of active styles. Else they will end up with an error afaik.

I had to write some code for the JOSM MapWithAI plugin to handle cases like this.

See https://gitlab.com/gokaart/JOSM_MapWithAI/-/blob/master/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/MapPaintUtils.java#L86 .

But it is (currently) very specialized for the MapWithAI plugin. I'll see if I can write something more generic sometime.

comment:4 Changed 7 months ago by Stereo

See also #18849

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Stereo
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.