RagePhoto: add G5E1P parser, fix G5E2P
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									2bb3f7f62d
								
							
						
					
					
						commit
						3cf6aedc85
					
				
					 2 changed files with 22 additions and 1 deletions
				
			
		|  | @ -357,7 +357,27 @@ bool RagePhoto::load() | |||
|         } | ||||
|         else if (format == static_cast<quint32>(ExportFormat::G5E2P)) { | ||||
|             p_photoFormat = PhotoFormat::G5EX; | ||||
|             p_fileData = dataBuffer.readAll(); | ||||
|             p_fileData = qUncompress(dataBuffer.readAll()); | ||||
|             p_inputMode = 0; | ||||
|             return load(); | ||||
|         } | ||||
|         else if (format == static_cast<quint32>(ExportFormat::G5E1P)) { | ||||
|             size = dataBuffer.skip(1); | ||||
|             if (size != 1) | ||||
|                 return false; | ||||
| 
 | ||||
|             char length[1]; | ||||
|             size = dataBuffer.read(length, 1); | ||||
|             if (size != 1) | ||||
|                 return false; | ||||
|             int i_length = QByteArray::number((int)length[0], 16).toInt() + 6; | ||||
| 
 | ||||
|             size = dataBuffer.skip(i_length); | ||||
|             if (size != i_length) | ||||
|                 return false; | ||||
| 
 | ||||
|             p_photoFormat = PhotoFormat::G5EX; | ||||
|             p_fileData = qUncompress(dataBuffer.readAll()); | ||||
|             p_inputMode = 0; | ||||
|             return load(); | ||||
|         } | ||||
|  |  | |||
|  | @ -28,6 +28,7 @@ class RagePhoto : public QObject | |||
|     Q_OBJECT | ||||
| public: | ||||
|     enum class ExportFormat : quint32 { | ||||
|         G5E1P = 0x454C0010U, | ||||
|         G5E2P = 0x01000032U, | ||||
|         G5E2S = 0x02000032U, | ||||
|         G5E3P = 0x01000033U, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue