perl tk 使用png,jpeg,tiff圖片時必須use單獨的包

bulletming發表於2019-07-12

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章