mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Set furthestV to first v in case compute_distances does not assign it
This commit is contained in:
		
							parent
							
								
									b299d7cfc2
								
							
						
					
					
						commit
						44494a1171
					
				| 
						 | 
				
			
			@ -1577,6 +1577,7 @@ quantize2(
 | 
			
		|||
    data.new.c.b = (int)(.5 + (double)mean[2] / (double)nPixels);
 | 
			
		||||
    for (i = 0; i < nQuantPixels; i++) {
 | 
			
		||||
        data.furthestDistance = 0;
 | 
			
		||||
        data.furthestV = pixelData[0].v;
 | 
			
		||||
        data.secondPixel = (i == 1) ? 1 : 0;
 | 
			
		||||
        hashtable_foreach_update(h, compute_distances, &data);
 | 
			
		||||
        p[i].v = data.furthestV;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user