mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	DOC add warning to the new functions in the image-API
This part is still in flux and one should not yet rely on it.
This commit is contained in:
		@@ -176,9 +176,14 @@ class Escpos(object):
 | 
				
			|||||||
    def fullimage(self, img, max_height=860, width=512, histeq=True, bandsize=255):
 | 
					    def fullimage(self, img, max_height=860, width=512, histeq=True, bandsize=255):
 | 
				
			||||||
        """ Resizes and prints an arbitrarily sized image
 | 
					        """ Resizes and prints an arbitrarily sized image
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        .. warning:: The image-printing-API is currently under development. Please do not consider this method part
 | 
				
			||||||
 | 
					                     of the API. It might be subject to change without further notice.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        .. todo:: Seems to be broken. Write test that simply executes function with a dummy printer in order to
 | 
					        .. todo:: Seems to be broken. Write test that simply executes function with a dummy printer in order to
 | 
				
			||||||
                  check for bugs like these in the future.
 | 
					                  check for bugs like these in the future.
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        print("WARNING: The image-printing-API is currently under development. Please do not consider this "
 | 
				
			||||||
 | 
					              "function part of the API yet.")
 | 
				
			||||||
        if isinstance(img, Image.Image):
 | 
					        if isinstance(img, Image.Image):
 | 
				
			||||||
            im = img.convert("RGB")
 | 
					            im = img.convert("RGB")
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
@@ -218,10 +223,15 @@ class Escpos(object):
 | 
				
			|||||||
    def direct_image(self, image):
 | 
					    def direct_image(self, image):
 | 
				
			||||||
        """ Direct printing function for pictures
 | 
					        """ Direct printing function for pictures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        .. warning:: The image-printing-API is currently under development. Please do not consider this method part
 | 
				
			||||||
 | 
					                     of the API. It might be subject to change without further notice.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        This function is rather fragile and will fail when the Image object is not suited.
 | 
					        This function is rather fragile and will fail when the Image object is not suited.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        :param image: PIL image object, containing a 1-bit picture
 | 
					        :param image: PIL image object, containing a 1-bit picture
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        print("WARNING: The image-printing-API is currently under development. Please do not consider this "
 | 
				
			||||||
 | 
					              "function part of the API yet.")
 | 
				
			||||||
        mask = 0x80
 | 
					        mask = 0x80
 | 
				
			||||||
        i = 0
 | 
					        i = 0
 | 
				
			||||||
        temp = 0
 | 
					        temp = 0
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user