Implement lossless jpeg progression
This commit is contained in:
		
							parent
							
								
									5f93725431
								
							
						
					
					
						commit
						ce37c6ef08
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		|  | @ -183,10 +183,16 @@ struct PreparedFileThumbnail { | ||||||
| 	if (!bytes.isEmpty() | 	if (!bytes.isEmpty() | ||||||
| 		&& (bytes.size() | 		&& (bytes.size() | ||||||
| 			<= full.width() * full.height() * kRecompressAfterBpp / 8) | 			<= full.width() * full.height() * kRecompressAfterBpp / 8) | ||||||
| 		&& (format == u"jpeg"_q) | 		&& (format == u"jpeg"_q)) { | ||||||
| 		&& Images::IsProgressiveJpeg(bytes)) { | 		if (!Images::IsProgressiveJpeg(bytes)) { | ||||||
|  | 			if (const auto result = Images::MakeProgressiveJpeg(bytes) | ||||||
|  | 				; !result.isEmpty()) { | ||||||
|  | 				return result; | ||||||
|  | 			} | ||||||
|  | 		} else { | ||||||
| 			return bytes; | 			return bytes; | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	auto result = QByteArray(); | 	auto result = QByteArray(); | ||||||
| 	QBuffer buffer(&result); | 	QBuffer buffer(&result); | ||||||
|  |  | ||||||
|  | @ -1 +1 @@ | ||||||
| Subproject commit 3cb645f50704b67537167e14623840a25fbdda7a | Subproject commit 6cd13e1057ee18f3c0e5168232e007dcaeee34b2 | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Ilya Fedin
						Ilya Fedin