mirror of
				https://invent.kde.org/frameworks/kimageformats.git
				synced 2025-11-03 13:24:20 -05:00 
			
		
		
		
	Return unsupported when reading 16bit RLE compressed PSD files
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								autotests/read/psd/argb16-raw-affinityphoto-1.8.5.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								autotests/read/psd/argb16-raw-affinityphoto-1.8.5.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 628 B  | 
							
								
								
									
										
											BIN
										
									
								
								autotests/read/psd/argb16-raw-affinityphoto-1.8.5.psd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								autotests/read/psd/argb16-raw-affinityphoto-1.8.5.psd
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 534 B  | 
							
								
								
									
										
											BIN
										
									
								
								autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.psd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.psd
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@ -194,6 +194,10 @@ static bool LoadPSD(QDataStream &stream, const PSDHeader &header, QImage &img)
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    if (compression) {
 | 
			
		||||
        if (header.depth != 8) {
 | 
			
		||||
            qWarning() << "RLE compressed PSD image with depth != 8 is not supported.";
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        // Skip row lengths.
 | 
			
		||||
        int skip_count = header.height * header.channel_count * sizeof(quint16);
 | 
			
		||||
        if (stream.skipRawData(skip_count) != skip_count) {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user