You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Bluesky app converts an image to a JPG, it first starts at a quality level of 100%. If the resulting file is above the file size limit of 1MB, it drops the quality by 10% and tries again.
Each quality drop has diminishing returns - it is not linear. Often, going from 100% to 98-99% can shave off 25 to 30% of the size saved at 100% quality. Even just around 96% can result in a file that's less than half of the 100% size. Jumping from 100% to 90% sacrifices an unnecessary amount of quality. Here's a chart from Wikipedia.
I think this loop should be changed, so that every single quality level from 100% down to 100% is tested.
Sidenote: The <2000x2000 & <1MB constraint on images sucks anyway! It would be swell if it were to be raised.
The text was updated successfully, but these errors were encountered:
When the Bluesky app converts an image to a JPG, it first starts at a quality level of 100%. If the resulting file is above the file size limit of 1MB, it drops the quality by 10% and tries again.
social-app/src/lib/media/manip.ts
Lines 181 to 183 in ab4e361
Each quality drop has diminishing returns - it is not linear. Often, going from 100% to 98-99% can shave off 25 to 30% of the size saved at 100% quality. Even just around 96% can result in a file that's less than half of the 100% size. Jumping from 100% to 90% sacrifices an unnecessary amount of quality. Here's a chart from Wikipedia.
I think this loop should be changed, so that every single quality level from 100% down to 100% is tested.
Sidenote: The <2000x2000 & <1MB constraint on images sucks anyway! It would be swell if it were to be raised.
The text was updated successfully, but these errors were encountered: