Fixed deepfry
This commit is contained in:
		
							parent
							
								
									cb3afa0050
								
							
						
					
					
						commit
						cbc2918228
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@ const ImageCommand = require("../../classes/imageCommand.js");
 | 
			
		|||
 | 
			
		||||
class DeepfryCommand extends ImageCommand {
 | 
			
		||||
  static description = "Deep-fries an image";
 | 
			
		||||
  static aliases = ["fry", "jpeg2", "nuke"];
 | 
			
		||||
  static aliases = ["fry", "jpeg2", "nuke", "df"];
 | 
			
		||||
 | 
			
		||||
  static noImage = "You need to provide an image to fry!";
 | 
			
		||||
  static command = "deepfry";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,8 @@ Napi::Value Deepfry(const Napi::CallbackInfo &info) {
 | 
			
		|||
 | 
			
		||||
    for (Image &image : coalesced) {
 | 
			
		||||
      Blob temp;
 | 
			
		||||
      image.level(QuantumRange / 2, QuantumRange / 2);
 | 
			
		||||
      image.colorSpace(Magick::sRGBColorspace);
 | 
			
		||||
      image.level(QuantumRange * 0.25, QuantumRange * 0.60);
 | 
			
		||||
      image.quality(1);
 | 
			
		||||
      image.magick("JPEG");
 | 
			
		||||
      image.write(&temp);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue