mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:22:44 +00:00 
			
		
		
		
	ImageDecoder: Add plumbing to allow a client to request an ideal size
This is only used for vector graphics format where requesting the true displayed size leads to visual enhancement.
This commit is contained in:
		
							parent
							
								
									4c23f0e142
								
							
						
					
					
						commit
						e56eb11dee
					
				
					 7 changed files with 13 additions and 13 deletions
				
			
		|  | @ -237,7 +237,7 @@ ErrorOr<void> ViewWidget::try_open_file(String const& path, Core::File& file) | |||
|         // Use out-of-process decoding for raster formats.
 | ||||
|         auto client = TRY(ImageDecoderClient::Client::try_create()); | ||||
|         auto mime_type = Core::guess_mime_type_based_on_filename(path); | ||||
|         auto decoded_image = client->decode_image(file_data, mime_type); | ||||
|         auto decoded_image = client->decode_image(file_data, OptionalNone {}, mime_type); | ||||
|         if (!decoded_image.has_value()) { | ||||
|             return Error::from_string_literal("Failed to decode image"); | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lucas CHOLLET
						Lucas CHOLLET