Q: 使用Image getInstance(final URL url)報錯 java.io.IOException: XXXXXXXX is not a recognized imageformat.

A: 確認圖檔是否為可使用格式:gif jpeg png

    /**
     * Gets an instance of an Image.
     *
     * @param filename
     *            a filename
     * @return an object of type <CODE>Gif</CODE>,<CODE>Jpeg</CODE> or
     *         <CODE>Png</CODE>
     * @throws BadElementException
     * @throws MalformedURLException
     * @throws IOException
     */

 

 

arrow
arrow

    咪卡恰比 發表在 痞客邦 留言(0) 人氣()