mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			611 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			611 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "globals.h"
 | |
| #include "image.h"
 | |
| #include "flags.h"
 | |
| #include "dataspec.h"
 | |
| #include "sector.h"
 | |
| #include "sectorset.h"
 | |
| #include "imagereader/imagereader.h"
 | |
| #include "imagewriter/imagewriter.h"
 | |
| #include "fmt/format.h"
 | |
| #include <algorithm>
 | |
| #include <iostream>
 | |
| #include <fstream>
 | |
| 
 | |
| SectorSet readSectorsFromFile(const ImageSpec& spec)
 | |
| {
 | |
| 	return ImageReader::create(spec)->readImage();
 | |
| }
 | |
| 
 | |
| void writeSectorsToFile(const SectorSet& sectors, const ImageSpec& spec)
 | |
| {
 | |
| 	std::unique_ptr<ImageWriter> writer(ImageWriter::create(sectors, spec));
 | |
| 	writer->adjustGeometry();
 | |
| 	writer->printMap();
 | |
| 	writer->writeImage();
 | |
| }
 |