mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			446 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			446 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Lucas Chollet <lucas.chollet@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Error.h>
 | |
| #include <LibGfx/Forward.h>
 | |
| 
 | |
| namespace Gfx {
 | |
| 
 | |
| struct JPEGEncoderOptions {
 | |
|     u8 quality { 75 };
 | |
| };
 | |
| 
 | |
| class JPEGWriter {
 | |
| public:
 | |
|     using Options = JPEGEncoderOptions;
 | |
| 
 | |
|     static ErrorOr<void> encode(Stream&, Bitmap const&, Options const& = {});
 | |
| 
 | |
| private:
 | |
|     JPEGWriter() = delete;
 | |
| };
 | |
| 
 | |
| }
 | 
