Here's the program that generated Figure 17-1. Notice the Photo image formats JPEG, PNG, and TIFF—not part of the Perl/Tk distribution—must be specifically imported. It's easy to forget this, and if you do, Tk won't find the proper image handler and will display "couldn't recognize data in image file."
使用png 图时候遇到上边报错couldn't recognize data in image file,
纳闷半天,怎么倒入,其实就是use一下那个包。
gif,bmp等图像格式不需要这样做。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/82392/viewspace-144723/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/82392/viewspace-144723/