mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 20:22:25 -05:00 
			
		
		
		
	[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
This commit is contained in:
		
					parent
					
						
							
								94c615d417
							
						
					
				
			
			
				commit
				
					
						f77005128a
					
				
			
		
					 36 changed files with 588 additions and 215 deletions
				
			
		|  | @ -197,7 +197,7 @@ func (suite *GetFileTestSuite) TestGetRemoteFileThumbnailUncached() { | |||
| 	suite.NoError(content.Content.Close()) | ||||
| 
 | ||||
| 	suite.Equal(thumbnailBytes, b) | ||||
| 	suite.Equal("image/webp", content.ContentType) | ||||
| 	suite.Equal("image/jpeg", content.ContentType) | ||||
| 	suite.EqualValues(testAttachment.Thumbnail.FileSize, content.ContentLength) | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue