lycheesync
lycheesync copied to clipboard
Create Medium size photos
Importing is great! however, i would like to also create the medium sized photos as well when i sync.
thanks.
lycheesyncer.py has the thumb creation section, it should be easy enough to copy that and change it to the medium photo size.
I am in the process of writing a makeMedium function and associated code to create the correct images.
hopefully in a few hours i can post a pull request after testing on my Ubuntu server,
cheers
Hi Palitu !
Thanks for your help. It's much appreciated. I will accept your PR after passing it through my regression tests (And when I will have a little time to work on it).
Thanks again !
Regards,
Gustave
Ok, just saw your PR, it wasn't attached to the issue ("fix #42" in the comment link the PR and the issue) Give me a little time to review/test it (It might take days I have very few time theses days)
Hi !
In your mediumIt function you fix the medium image size to 1920, 1080. Which may be bigger than the original image size... And may not respect the original image ratio.
What about reading the original image size and multiplying it by 0.5 or 2/3 ?
yes, good point. I used that size as 1920 x 1080 is what is referenced in Lychee, and the comments in lychee state that you need to make changes to other picture size references if you change the medium size. you are right though, it should be respecting the aspect ratio. I will have a look and re-submit.
btw - first time i have ever done any PR, so apologies if it isn't quite right ;)
Just been reading the Image.thumbnail function. You pass it the max size, and it will resize, preserving aspect ratio.
OK, we're good to go on 1920 x 1080 if it's a lychee requirement. The thumbnail doc indeed specify aspect ratio preservation.
And btw, no problem with your PR, it's really much appreciated and if I had checked my emails I would have see your PR ;)
Regards
I have been running with the medium size changes that i sent to you, and it is extremely slow!
maybe it would be better to finish importing, then run a "create mediums" function for all photos in the "Big" directory. that way you would get the albums built quickly, then the medium files are created once you have all your files.
something along the lines of :
For each photo in "Big" check if a medium exists create it if it doesn't set the medium flag to "1"
Hi palitu,
Thanks for the advice ! Le 1 déc. 2015 00:40, "palitu" [email protected] a écrit :
I have been running with the medium size changes that i sent to you, and it is extremely slow!
maybe it would be better to finish importing, then run a "create mediums" function for all photos in the "Big" directory. that way you would get the albums built quickly, then the medium files are created once you have all your files.
something along the lines of :
For each photo in "Big" check if a medium exists create it if it doesn't set the medium flag to "1"
— Reply to this email directly or view it on GitHub https://github.com/GustavePate/lycheesync/issues/42#issuecomment-160799779 .