Browse Source

Fix error when image has alpha channel

nagadomi 9 years ago
parent
commit
5a80a70e65
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/image_loader.lua

+ 1 - 1
lib/image_loader.lua

@@ -14,7 +14,7 @@ function image_loader.encode_png(rgb, alpha, depth)
    rgb = iproc.byte2float(rgb)
    if alpha then
       if not (alpha:size(2) == rgb:size(2) and  alpha:size(3) == rgb:size(3)) then
-	 alpha = gm.Image(alpha, "I", "DHW"):size(rgb:size(3), rgb:size(2), "SincFast"):toTensor("float", "I", "DHW")
+	 alpha = gm.Image(alpha, "I", "DHW"):size(rgb:size(3), rgb:size(2), "Sinc"):toTensor("float", "I", "DHW")
       end
       local rgba = torch.Tensor(4, rgb:size(2), rgb:size(3))
       rgba[1]:copy(rgb[1])