svsticky / constipated-koala

Management system for our study association
https://koala.svsticky.nl/
GNU General Public License v3.0
16 stars 4 forks source link

Rescale posters uploaded to Koala #413

Closed Ckef closed 5 years ago

Ckef commented 5 years ago

Expected behaviour

Rescale (crop or enlargen) poster .pdf files when they're uploaded to Koala. All posters should be A3 format.

Actual behavior

Currently it isn't enforced for posters to be the same scale. This causes difficulties when trying to consistently render posters at the same position and size.

martijncasteel commented 5 years ago

In the past some posters were in landscape mode this would result in some strange looking posters. Cropping can result in loosing information, and resizing results in an altered aspect ratio. Perhaps it can be done in the samen change as #345

emielvanrijn1 commented 5 years ago

It isn't much of a difference, but it breaks the UI a bit in different places (Koala, Website). So the question is: where to 'resize' a poster. Atm, it is done on the website itself, and nothing is done in Koala (activity-index) (which accounts for some REEE's from members :)...). So do we keep changing sizes many times 'client-side' or do it one time when uploading the posters?

martijncasteel commented 5 years ago

@emielvanrijn so to be clear, all posters are portrait? And they have to be in the same aspect ratio of an A3? (842x1190)

martijncasteel commented 5 years ago

What is done on the client-side, perhaps I can use that as input

emielvanrijn1 commented 5 years ago

Sorry for the delay, but yes, by default all posters should be A3 standard size. Not all submitted posters are of that size, but they should be altered to be so.

martijncasteel commented 5 years ago

Fixed posters to the portrait aspect ratio. Landscape posters are now completely useless, so I'm not sure if you want to keep this and perhaps revert this commit.

emielvanrijn1 commented 5 years ago

Since my first year I have never seen a landscape poster (2015-2016) so I guess we are safe. For the website, we would like to have the option to use a thumbnail instead of the actual poster, which is 1080p. A third of these dimensions would be sufficient, and extremely speed up pageloading on the /activiteiten page. When throttled now to 3G connection, pageloading takes 56 seconds, each image takes 21-33 seconds to load as each is 1MB...

martijncasteel commented 5 years ago

That's a lot, so you'll want two different images? A thumbnail and a full size of 1080p? I recon two url's will be available in the message so the client can decide which one to use when.

emielvanrijn1 commented 5 years ago

Ye, maybe make it available through the API? Adding a new field: thumbnail next to the existing poster field?

fiinnnn commented 5 years ago

@martijncasteel I can work on the thumbnails if you haven't started already.

martijncasteel commented 5 years ago

Adding a new field: thumbnail next to the existing poster field?

@finnvos123 I haven’t started in this :)