Explorar el Código

Merge pull request #39 from nagadomi/set_compression_level

fix slow compression
nagadomi hace 10 años
padre
commit
3438692f49
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      lib/image_loader.lua

+ 2 - 2
lib/image_loader.lua

@@ -26,11 +26,11 @@ function image_loader.encode_png(rgb, alpha)
       rgba[4]:copy(alpha)
       local im = gm.Image():fromTensor(rgba, "RGBA", "DHW")
       im:format("png")
-      return im:toBlob(92) -- I don't know why is 92 best compression ratio.
+      return im:toBlob(9)
    else
       local im = gm.Image(rgb, "RGB", "DHW")
       im:format("png")
-      return im:toBlob(92)
+      return im:toBlob(9)
    end
 end
 function image_loader.save_png(filename, rgb, alpha)