Omnibus commited on
Commit
6f29d67
·
1 Parent(s): 864e9e3

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -2,7 +2,7 @@ import cv2
2
  import numpy as np
3
  from PIL import Image, PngImagePlugin
4
 
5
- def test_roundtrip_text(im_name,extra):
6
  # Check text roundtripping
7
 
8
  im = Image.open(im_name)
@@ -10,7 +10,7 @@ def test_roundtrip_text(im_name,extra):
10
  info = PngImagePlugin.PngInfo()
11
  info.add_text("TXT", extra)
12
  im.save("test","png",pnginfo=info)
13
-
14
 
15
 
16
  def to_bin(data):
 
2
  import numpy as np
3
  from PIL import Image, PngImagePlugin
4
 
5
+ def png_encode(im_name,extra):
6
  # Check text roundtripping
7
 
8
  im = Image.open(im_name)
 
10
  info = PngImagePlugin.PngInfo()
11
  info.add_text("TXT", extra)
12
  im.save("test","png",pnginfo=info)
13
+ return("test.png","")
14
 
15
 
16
  def to_bin(data):