Jelle Raaijmakers 
								
							 
						 
						
							
							
							
							
								
							
							
								1388b6866e 
								
							 
						 
						
							
							
								
								LibGfx: Return descriptive errors when decoding PNGs  
							
							... 
							
							
							
							We had an interesting tri-state `ErrorOr<bool>` going on when decoding
PNGs; replace it with `ErrorOr<void>` and add some descriptive errors. 
							
						 
						
							2024-11-04 14:47:37 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Raaijmakers 
								
							 
						 
						
							
							
							
							
								
							
							
								2ce7ec8251 
								
							 
						 
						
							
							
								
								LibGfx: Use libpng's built-in signature verification  
							
							
							
						 
						
							2024-11-04 14:47:37 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									justus2510 
								
							 
						 
						
							
							
							
							
								
							
							
								144907f5bd 
								
							 
						 
						
							
							
								
								LibGfx: Apply Exif orientation for PNG images  
							
							... 
							
							
							
							Fixes wpt/png/exif-chunk.html.
At some point there should probably be some mechanism to handle this
outside of the individual decoder plugins. The TIFF decoder seems to
have its own version of this, and as far as I can tell, the JPEG decoder
doesn't handle this at all, even though that's probably the most common
use case for Exif orientations. :^) 
							
						 
						
							2024-10-31 02:18:08 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								0c7670b226 
								
							 
						 
						
							
							
								
								LibGfx: Rename Painter => DeprecatedPainter  
							
							
							
						 
						
							2024-08-20 09:30:05 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Khaled Lakehal 
								
							 
						 
						
							
							
							
							
								
							
							
								2d6069650a 
								
							 
						 
						
							
							
								
								LibGfx: Enhance APNG format support  
							
							... 
							
							
							
							Improve handling of APNG chunks by avoiding premature termination when
encountering non-fcTL chunks. With this patch, the browser now passes
additional APNG-related tests in the "png/" Web Platform Tests (WPT)
suite. 
							
						 
						
							2024-08-19 20:04:31 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Raaijmakers 
								
							 
						 
						
							
							
							
							
								
							
							
								a430ae6dcf 
								
							 
						 
						
							
							
								
								LibGfx: Mark PNG bitmaps as having unpremultiplied alpha  
							
							
							
						 
						
							2024-08-07 18:51:12 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Andreas Kling 
								
							 
						 
						
							
							
							
							
								
							
							
								8a3dc5ea0a 
								
							 
						 
						
							
							
								
								LibGfx: Remove home-grown PNG codec in favor of libpng+apng  
							
							
							
						 
						
							2024-06-21 07:31:37 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								09f4032eeb 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Read metadata from the eXIf chunk  
							
							... 
							
							
							
							The test image comes from this WPT test:
http://wpt.live/png/exif-chunk.html  
							
						 
						
							2024-05-26 14:54:43 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								6713ed483b 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Spec comment for PNGImageDecoderPlugin::unfilter_scanline()  
							
							... 
							
							
							
							Every time I read this, I'm like "wait, this does the wrong thing for
images with bpp != 8". It doesn't, though. 
							
						 
						
							2024-01-15 23:42:45 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								000d9da73c 
								
							 
						 
						
							
							
								
								LibGfx: Allow passing FilterType::None to unfilter_scanline()  
							
							... 
							
							
							
							Makes calling this in LibPDF less awkward, and there's no reason
not to allow this. 
							
						 
						
							2023-11-17 19:09:50 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								574357ef00 
								
							 
						 
						
							
							
								
								LibGfx: Use ceil_div() in png decoder  
							
							... 
							
							
							
							No behavior change, arguably easier to read. 
							
						 
						
							2023-11-17 19:09:50 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								5a70813d11 
								
							 
						 
						
							
							
								
								LibGfx: Make unfilter_scanline() a static PNGImageDecoderPlugin method  
							
							... 
							
							
							
							That way, LibPDF will be able to call it.
No behavior change. 
							
						 
						
							2023-11-17 19:09:50 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								588d6fab22 
								
							 
						 
						
							
							
								
								LibGfx+LibPDF: Create filter_type() for converting u8 to FilterType  
							
							... 
							
							
							
							...and use it in LibPDF.
No behavior change. 
							
						 
						
							2023-11-17 19:09:50 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								6b2c60404d 
								
							 
						 
						
							
							
								
								LibGfx: Use PNG::paeth_predictor() in png decoding path  
							
							... 
							
							
							
							Increases code reuse between encoder and decoder a tiny bit.
No behavior change.
(We should use the vectorized version in the future! But first,
we should learn to do the prediction in-place.) 
							
						 
						
							2023-11-17 19:09:50 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Tim Ledbetter 
								
							 
						 
						
							
							
							
							
								
							
							
								4cc2fc4afa 
								
							 
						 
						
							
							
								
								LibGfx/PNGLoader: Remove redundant IHDR bit depth validation  
							
							
							
						 
						
							2023-10-08 10:46:00 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Tim Ledbetter 
								
							 
						 
						
							
							
							
							
								
							
							
								bc6ae54b59 
								
							 
						 
						
							
							
								
								LibGfx/PNGLoader: Don't allow multiple consecutive IHDR chunks  
							
							
							
						 
						
							2023-10-08 10:46:00 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Tim Ledbetter 
								
							 
						 
						
							
							
							
							
								
							
							
								b64ed060d8 
								
							 
						 
						
							
							
								
								LibGfx/PNGLoader: Add validation for IHDR width, height and bit depth  
							
							
							
						 
						
							2023-10-06 08:21:58 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									MacDue 
								
							 
						 
						
							
							
							
							
								
							
							
								bbf66ea055 
								
							 
						 
						
							
							
								
								LibGfx: Remove maximum size limit for decoded images  
							
							... 
							
							
							
							It is unlikely this is needed anymore, and as pointed out things should
now safely return OOM if the bitmap is too large to allocate.
Also, no recently added decoders respected this limit anyway.
Fixes  #20872  
							
						 
						
							2023-09-03 14:36:54 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Tim Schumacher 
								
							 
						 
						
							
							
							
							
								
							
							
								8a853278d0 
								
							 
						 
						
							
							
								
								LibCompress: Port ZlibDecompressor to AK::Stream  
							
							
							
						 
						
							2023-08-23 12:03:37 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								5d94bb4fcc 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Remove the useless HeaderDecoded state  
							
							
							
						 
						
							2023-07-17 06:49:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								a173275afa 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Reject files that doesn't start with a IHDr chunk  
							
							
							
						 
						
							2023-07-17 06:49:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								8d907b6535 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Don't use a loop to read chunks in decode_png_ihdr()  
							
							... 
							
							
							
							This chunk is the first one, so we can remove that loop. 
							
						 
						
							2023-07-17 06:49:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								ff6d82c3e7 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Decode the header in create() and remove initialize()  
							
							... 
							
							
							
							This is done as a part of #19893 . As `create()` is now the last user of
`decode_png_ihdr()`, we can easily make it return an `ErrorOr`. 
							
						 
						
							2023-07-17 06:49:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								07f72b6d41 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Don't try to guess if IHDR has been decoded  
							
							
							
						 
						
							2023-07-17 06:49:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								07d3232f2d 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Use PNG specific vocabulary over a generic name  
							
							
							
						 
						
							2023-07-17 06:49:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nico Weber 
								
							 
						 
						
							
							
							
							
								
							
							
								f7f9f1f47f 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Make invalid sRGB chunk size non-fatal  
							
							... 
							
							
							
							https://www.haiku-os.org/images/bg-page.png  has a size of 0 for
example.
Just ignoring the chunk instead of assuming that the image is sRGB
and has Perceptual rendering intent matches what libpng does
(cf `png_handle_sRGB()`), so let's do that too.
(All other chunk handlers are still strict about size.) 
						
							2023-07-11 15:07:42 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								e5b70837de 
								
							 
						 
						
							
							
								
								LibGfx: Remove ImageDecoder::set_[non]volatile()  
							
							... 
							
							
							
							These methods are unused so let's remove them. 
							
						 
						
							2023-07-08 01:45:46 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									MacDue 
								
							 
						 
						
							
							
							
							
								
							
							
								e7cddda7e1 
								
							 
						 
						
							
							
								
								LibGfx: Allow passing an ideal size to image decoders  
							
							... 
							
							
							
							The ideal size is the size the user will display the image. Raster
formats should ignore this parameter, but vector formats can use
it to generate a bitmap of the ideal size. 
							
						 
						
							2023-07-03 23:54:51 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								36153136c4 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Use ByteBuffer instead of Vector<u8>  
							
							
							
						 
						
							2023-06-12 06:41:16 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								15df0224e1 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Remove an unused field in PNGLoadingContext  
							
							
							
						 
						
							2023-06-12 06:41:16 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								07b6c2ebfc 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Make chunk-related functions fallible  
							
							
							
						 
						
							2023-06-12 06:41:16 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								96a1a8512f 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Use a StringView to compare the chunk type  
							
							
							
						 
						
							2023-06-12 06:41:16 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Karol Kosek 
								
							 
						 
						
							
							
							
							
								
							
							
								970a3ef4d8 
								
							 
						 
						
							
							
								
								LibGfx: Fix partial loading of tall and interlaced PNG files  
							
							... 
							
							
							
							The function stopped copying data from a subimage when the _y_ value
exceeded the image _width_ value, resulting in an incomplete image. 
							
						 
						
							2023-06-06 19:55:51 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Ben Wiederhake 
								
							 
						 
						
							
							
							
							
								
							
							
								da394abe04 
								
							 
						 
						
							
							
								
								LibGfx+Fuzz: Convert ImageDecoder::initialize to ErrorOr  
							
							... 
							
							
							
							This prevents callers from accidentally discarding the result of
initialize(), which was the root cause of this OSS Fuzz bug:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary  
							
						 
						
							2023-05-12 09:40:24 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Tom 
								
							 
						 
						
							
							
							
							
								
							
							
								f0f82c6391 
								
							 
						 
						
							
							
								
								LibGfx/PNG: Add support for animated PNG images  
							
							
							
						 
						
							2023-05-05 15:20:44 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Tom 
								
							 
						 
						
							
							
							
							
								
							
							
								e7921cfe14 
								
							 
						 
						
							
							
								
								LibGfx: Add first_animated_frame_index method to ImageDecoder  
							
							... 
							
							
							
							Some image formats such as APNG may not use the first frame for
animations. 
							
						 
						
							2023-05-05 15:20:44 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Lucas CHOLLET 
								
							 
						 
						
							
							
							
							
								
							
							
								496b7ffb2b 
								
							 
						 
						
							
							
								
								LibGfx: Move all image loaders and writers to a subdirectory  
							
							
							
						 
						
							2023-03-21 22:39:25 +01:00