mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:22:45 +00:00 
			
		
		
		
	LibGfx: Rename 32-bit BitmapFormats to BGRA8888 and BGRx888x
The previous names (RGBA32 and RGB32) were misleading since that's not the actual byte order in memory. The new names reflect exactly how the color values get laid out in bitmap data.
This commit is contained in:
		
							parent
							
								
									0bfdf95af6
								
							
						
					
					
						commit
						e0f32626bc
					
				
					 31 changed files with 70 additions and 70 deletions
				
			
		|  | @ -46,7 +46,7 @@ RefPtr<ImageData> ImageData::create_with_size(JS::GlobalObject& global_object, i | |||
| 
 | ||||
|     auto data_handle = JS::make_handle(data); | ||||
| 
 | ||||
|     auto bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::RGBA32, Gfx::IntSize(width, height), 1, width * sizeof(u32), (u32*)data->data()); | ||||
|     auto bitmap = Gfx::Bitmap::create_wrapper(Gfx::BitmapFormat::BGRA8888, Gfx::IntSize(width, height), 1, width * sizeof(u32), (u32*)data->data()); | ||||
|     if (!bitmap) | ||||
|         return nullptr; | ||||
|     return adopt(*new ImageData(bitmap.release_nonnull(), move(data_handle))); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling