On Wednesday, January 18, 2017 at 2:01:52 AM UTC+1, mpl wrote: > > > On 17 January 2017 at 18:28, Attila Tajti <[email protected] > <javascript:>> wrote: > > >> Btw, the thumbnails in the publisher show up with an incorrect aspect >> ratio (apparently the image is streched into a square shape) but standalone >> images appear fine. Is there anything I can do about it? >> > > Yeah, I did the very minimum amount of math for the thumbs. > You can: > 1) as usual file an issue :-) (but that probably won't be in my > priorities, sorry) > 2) fix the code at app/publisher/js/members.go. Aaron had done it pretty > well for the web UI (I'm still seeing some bugs if I mix images with very > different sizes though), so that might be the way to go for inspiration. > >
For square thumbnails to work thumbnail images are needed with proper size (i.e. cropped to 200x200px), perhaps with new query parameters cw and ch (crop width/height) on the server. The cropping could alternatively be done in the browser, but then an image should be proportionally scaled so that (width >= 200px && height >= 200px && (height == 200px || width == 200px)). Then the server would need store bits of the image that are never shown, therefore it would be better to have it cropped on the server side The handler would scale the image until either (scaledwidth == cw && scaledheight >= ch) or (scaledheight == ch || scaledwidth >= cw) is true, crop the top/bottom or left/right sides of it so that the thumb will have the exact dimensions cw × ch. WDYT? -- You received this message because you are subscribed to the Google Groups "Camlistore" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
