[performance] move thumbnail generation to go code where possible (#3183)
* wrap thumbnailing code to handle generation natively where possible * more code comments! * add even more code comments! * add code comments about blurhash generation * maintain image rotation if contained in exif data * move rotation before resizing * ensure pix_fmt actually selected by ffprobe, check for alpha layer with gifs * use linear instead of nearest-neighbour for resizing * work with image "orientation" instead of "rotation". use default 75% quality for both webp and jpeg generation * add header to new file * use thumb extension when getting thumb mime type * update test models and tests with new media processing * add suggested code comments * add note about thumbnail filter count reducing memory usage
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 11 KiB |
BIN
testrig/media/ohyou-small.jpeg
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
BIN
testrig/media/sloth-small.jpeg
Normal file
|
After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 41 KiB |
BIN
testrig/media/team-fortress-small.jpeg
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 10 KiB |
BIN
testrig/media/thoughtsofdog-small.jpeg
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
BIN
testrig/media/trent-small.jpeg
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
BIN
testrig/media/welcome-small.jpeg
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
BIN
testrig/media/zork-small.jpeg
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 35 KiB |